Welcome to WebmasterWorld Guest from 188.8.131.52 , register , free tools , login , search , subscribe , help , library , announcements , recent posts , open posts Accredited PayPal World Seller
HTML code to deny cache of .asp webpages cccc msg:3851316 9:03 am on Feb 17, 2009 (gmt 0) hi
how should be the HTML code on the webserver to deny cache of .asp webpages?
is this correct?
<meta http-equiv="pragma" content="no-cache" /> <meta http-equiv="Cache-Control" content="no-cache" />
but what are differencies between "pragma" and "Cache-Control" ?
mattur msg:3851441 1:18 pm on Feb 17, 2009 (gmt 0)
Setting the headers is more reliable than using meta tags: see How (and how not) to control caches [ mnot.net]
Meta tags are easy to use, but arenít very effective. Thatís because theyíre only honored by a few browser caches (which actually read the HTML), not proxy caches (which almost never read the HTML in the document). While it may be tempting to put a Pragma: no-cache meta tag into a Web page, it wonít necessarily cause it to be kept fresh.
Here's example ASP code from
ASPFAQ [ classicasp.aspfaq.com] <% Response.ExpiresAbsolute = #2000-01-01# Response.AddHeader "pragma", "no-cache" Response.AddHeader "cache-control", "private, no-cache, must-revalidate" %> cccc msg:3853606 12:55 am on Feb 20, 2009 (gmt 0)
thanks a lot!
I'll try this code:
Response.Expires = 0 Response.ExpiresAbsolute = 0 Response.AddHeader "Pragma", "no-cache" Response.AddHeader "cache-control", "no-store" Response.AddHeader "cache-control", "private, no-cache, must-revalidate"
to prevent any kind of caching.
cccc msg:3855310 5:30 pm on Feb 22, 2009 (gmt 0)
is this code correct? cccc msg:3855424 9:51 pm on Feb 22, 2009 (gmt 0)
could someone explain pls, what exactly private and must-revalidate means? mattglet msg:3856967 8:40 pm on Feb 24, 2009 (gmt 0)
[ ...] w3.org