Closed Thread Icon

Topic awaiting preservation: Prevent caching of an SSI page (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=12248" title="Pages that link to Topic awaiting preservation: Prevent caching of an SSI page (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Prevent caching of an SSI page <span class="small">(Page 1 of 1)</span>\

 
Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 06-05-2002 06:47

OK, I've got this html page calling a script via SSI, and IE is caching the page, so it only calls the script if I reload (but not if i just enter the address again and hit enter).

How can I get the browser to not cache the page? Can a meta tag be reliably used for this?

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 06-05-2002 08:30

try that:

<meta http-equiv="pragma" content="no-cache">

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 06-05-2002 08:44

Thanks! I'll give this a shot. How reliable and cross-browser is it? (Will all browsers take its advice?)

someoneInverse
Bipolar (III) Inmate

From:
Insane since: May 2002

posted posted 06-05-2002 08:50

<metta http-equiv="pragma" content="no-cache">
<metta http-equiv="expires" content="-1">

should do you in most cases for most browsers, although pragma no-cache strictly speaking only works under ssl and even then it's a little buggy in ie if a page buffer isn't filled before the browser encounters the no-cache tag

coupled with the above, I find that if you really dont want a page to be cached, it's usually best to add a randomly generated dummy querystring onto the url of the page that calls the script - this usually fools ie into thinking that it hasn't encountered this page before.
for example: something like whatever.htm?x=050620020747 - (the date and time) should works a treat

hope this helps

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 06-05-2002 21:42

Well, the script is called with SSI, so all IE gets is a page that it thinks is static; I could put a random number in there with SSI, but the server would be the only one to see it.

someoneInverse
Bipolar (III) Inmate

From:
Insane since: May 2002

posted posted 06-07-2002 11:34

whoops there is that, isn't there...
forget the last bit then, but the meta tags should be fine unless the page is small, in which case you're need another pragma no-cache at the bottom of the page (its one of ie's features)


« BackwardsOnwards »

Show Forum Drop Down Menu