Your Ad Here

Posted By

Shurik76 on 07/09/09


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

benrudolph
higrade


Prevent pages from caching


 / Published in: ASP
 

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

  1. <%
  2. Response.Expires = -1
  3. Response.Expiresabsolute = Now() - 1
  4. Response.AddHeader "pragma","no-cache"
  5. Response.AddHeader "cache-control","private"
  6. Response.CacheControl = "no-cache"
  7. %>
  8.  
  9. 'Or if thats too long winded then
  10.  
  11. <%
  12. Response.Expires = -1000
  13. %>
  14.  
  15. 'Abbreviated version (as per http://www.devx.com/vb2themax/Tip/18635)
  16. <%
  17. Response.CacheControl = "no-cache"
  18. Response.AddHeader "Pragma", "no-cache"
  19. Response.Expires = -1
  20. %>

Report this snippet  

You need to login to post a comment.