'캐쉬'에 해당되는 글 1건

언어별로 no-cache 설정 방법


언어별로 브라우저에 페이지별 강제 캐쉬 콘트롤 하는 예제입니다~~



HTML인 경우 

<META http-equiv="Expires" content="-1"> 

<META http-equiv="Pragma" content="no-cache"> 

<META http-equiv="Cache-Control" content="No-Cache"> 


ASP인 경우   

<%   

Response.Expires = 0   

Response.AddHeader "Pragma","no-cache"   

Response.AddHeader "Cache-Control","no-cache,must-revalidate"   

%>   


JSP인 경우   

<%   

response.setHeader("Cache-Control","no-store");   

response.setHeader("Pragma","no-cache");   

response.setDateHeader("Expires",0);   

if (request.getProtocol().equals("HTTP/1.1")) 

        response.setHeader("Cache-Control", "no-cache"); 

%>   


PHP인 경우   

<?   

header("Pragma: no-cache");   

header("Cache-Control: no-cache,must-revalidate");   

?>



블로그 이미지

슬픈외로움

개발이 어려워? 모든것엔 답이있다...

,