본문 바로가기

Tip&Tech/Web

웹 언어별 캐시파일 만들지 않는 방법

HTML
<META http-equiv="Expires" content="-1" />
<META http-equiv="Pragma" content="no-cache" />
<META http-equiv="Cache-Control" content="No-Cache" />

PHP
<?
header("Pragma: no-cache");
header("Cache-Control: no-cache,must-revalidate");
?>

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");
%>

WML
<META http-equiv="Cache-Control" content="max-age=no-cache" forua="true"/>
<META http-equiv="Cache-Control" content="must-revalidate" forua="true"/>