Welcome to WebmasterWorld Guest from 22.214.171.124 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Pubcon Platinum Sponsor 2014
HTML code to deny cache of .asp webpages cccc
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" ?
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
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.
is this code correct? cccc
could someone explain pls, what exactly private and must-revalidate means? mattglet
[ ...] w3.org