언어별로 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");
?>
'프로그래밍 Tip > ASP & 기타' 카테고리의 다른 글
[C#] Oracle Database 연결 및 사용 (0) | 2019.07.16 |
---|---|
[ASP/VB] 개체를 찾을 수 없습니다!! 오류!! (0) | 2016.04.08 |