Return to Snippet

Revision: 15542
at July 9, 2009 12:03 by Shurik76


Updated Code
<%
Response.Expires = -1
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
%>

'Or if thats too long winded then

<%
Response.Expires = -1000
%>

'Abbreviated version (as per http://www.devx.com/vb2themax/Tip/18635)
<%
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1
%>

Revision: 15541
at July 9, 2009 12:01 by Shurik76


Initial Code
<%
Response.Expires = -1
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
%>

'Or if thats too long winded then

<%
Response.Expires = -1000
%>

'Abbreviated version (as per http://www.devx.com/vb2themax/Tip/18635)
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires = -1

Initial URL
http://www.codefixer.com/tutorials/stop_caching.asp

Initial Description

                                

Initial Title
Prevent pages from caching

Initial Tags

                                

Initial Language
ASP