[thelist] Forcing Browsers not to cache

Keith cache at dowebscentral.com
Wed Jan 8 23:01:07 CST 2003


At 04:28 PM Wednesday 1/8/2003, Sam wrote:

><META HTTP-EQUIV="Pragma" CONTENT="no-cache">
><META HTTP-EQUIV="Expires" CONTENT="-1">
>
>The problem occurs in both NS 7 and NS 4.7.  I haven't tried any other
>browsers.

It's been a while since I had to document this so I don't have the relevant
links, but:

Pragma no-cache meta tags are ignored by all browsers and Pragma no-cache
as a header is ignored by all server caching UNLESS you use https. It is an
https control only. IE5+ browsers and I would guess NS6+ it has replaced
Pragma no-cache with

<META http-equiv="Cache-Control" content="no-cache">

The expires meta tag will not work unless you specify a real and complete
date and time in the past

<META HTTP-EQUIV="expires" CONTENT="Tue, 20 Aug 1996 14:25:27 GMT">

>Problem is, when the user uses an edit function to revise his name, then
>proceeds from there to the certificate again, the page is NOT reloaded.

If by edit function you mean a javascript function, use
location.reload(true) to force a hard reload of the page. If, on the
otherhand, you are just returning to the page and want to request a reload
from the server, add a unique query string to the url. Even a .html?123456
will tell the browser to get a fresh copy since the browser has no way of
knowing but what html is an executable on the server.  By "unique" I mean a
different query string would be needed the second time the same browser
accessed the page since IE will cache even yard long ASP query strings and
not go to the server for a refresh the second time it sees that entire
string in the location.




Keith
====================
cache at dowebscentral.com




More information about the thelist mailing list