Markup(마크업)
[html/web] 캐시(cache) 완전 무효화/ html에서 캐시 막기
개발자 고포고
2022. 8. 13. 09:08
반응형
[html/web] 캐쉬 완전 무효화/ html에서 캐쉬 막기
#Chche-Control:no-cache,no-store,must-revalidate
#Pragma:no-cache
처리를 진행하면 된다.
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
다음과 같이 작성하면 된다.
no-cache
-데이터에는 캐시되지만, 항상 오리진 서버에 검증하고 사용
-오리진 서버가 연결이 안되면, 캐시 데이터로 노출
no-store
-데이터에 민감한 정보가 있으므로 저장하면 안됨
must-revalidate
-캐시 만료후 최초 조회시 오리진 서버에 검증해야함
-오리진 서버가 연결이 안되면, 캐시 데이터로도 노출하지 않고 504 오류 발생
Pragma:no-cache
HTTP 1.0 하위호환
#cache #http #no cache #캐시 사용안함 #캐시 제한 #캐시 막기
반응형