Click to See Complete Forum and Search --> : Does IE not cache web pages?
Mike Burdick
09-19-2004, 07:36 PM
Maybe some of you can help me. I'm having a great deal of trouble trying to prevent IE from caching a dynamically created page using a perl script. My page works okay in Firefox but doesn't work in IE.
Does anyone have, or could provide a link to any page that prevents caching in IE? I don't care what language it's written in, I just want to know if IE will do it or if I have some setting that's causing me this trouble.
Thanks...Mike
ray326
09-19-2004, 07:45 PM
With a real browser you could send cache avoidance headers in the response. With IE it's usually better to include them in meta tags in the head of the page you're returning.
PikoTech
09-19-2004, 07:58 PM
For those of us that ARE fans of IE and do use it (that would be most people then?) try using these META tags:
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="expires" content="0">
They work fine for me, and disable cache of pages in most browsers as well as IE.
Mike Burdick
09-19-2004, 08:10 PM
PikoTech,
I've tried those tags with no luck...must be something I'm not doing right. Maybe it has something to to with a "dynamically" produced page...
Would you mind posting a link to your page so I can see it work? Maybe I have some setting in IE that's not working correctly.
Your help is greatly appreciated.
Mike
PikoTech
09-19-2004, 08:16 PM
Hi Mike,
Would love to however the stuff runs behind a passworded website.
You can get to the first page by visiting http://www.ezeschools.com/messenger/default.asp however though.
If you run an incorrect login, it will redirect you to the same page, however it posts through a variable which displays an error message.
This has not cached on IE since I updated these pages last week (we were having some awful problems).
Have a play, borrow the code, see what it does for you?
richard_nl
09-23-2004, 04:35 AM
The Pragma statement up above sometimes fails in IE because of the way IE caches files. There is a 64K buffer that must be filled before a page is cached in IE. The problem is that the vast majority of the pages using the Pragma statement put it between the HEAD tags.
The HEAD loads and the Pragma comes into play. The browser gets the go ahead to not cache the page, however there is not yet a page to not cache. How's that for backwards logic? Since the page hasn't filled the 64K buffer, there's no page so the Pragma is ignored. Thus...the page is cached.
The solution is to play to the buffer. If you're really serious about the Pragma working, place another set of HEAD tags at the bottom of the document, before the end HTML tag and re-enter the Pragma. This is a suggestion straight from Microsoft Support. The page would look like this:
<HTML>
<HEAD>
<TITLE>---</TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD>
<BODY>
Text in the Browser Window
</BODY>
<HEAD>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD>
</HTML>
Taken from the HTMLGoodies website
davidbrent
09-23-2004, 06:24 AM
this might help.
http://www.webdeveloper.com/forum/showthread.php?s=&threadid=44687&highlight=Cache
Webnauts
09-23-2004, 08:55 AM
Don't forget to use this one:
<meta name="MSSmartTagsPreventParsing" content="TRUE" />