Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page is still caching. How can I make it stop? 1

Status
Not open for further replies.

THE4MAN

Technical User
Mar 17, 2002
73
0
0
US
I had searched for and found a previous post to try and remedy the problem of page caching and then not displaying correctly on subsequent visits.

<META HTTP-EQUIV=&quot;Pragma&quot; CONTENT=&quot;no-cache&quot;> appears to be the correct fix for this problem so I inserted this into my header on the following page...
But each time I visit this page, those nasty little scroll bars appear. The only way to get rid of them is to hit &quot;refresh&quot; in the browser and then all is fine again.

Could someone look at this page and tell me what I can do so that it doesn't cache? I just want the page to display cleanly on each visit wihtout any scroll bars.

Thanks in advance for the help.

Dave Fore
 
BTW IE 5 has a problem with caching. No matter what meta tags you put on your page, IE 5 ignores them (IE 5.5+ is okay).

The only way to stop it caching is to use a javascript refresh that handles all versions of the browser. It's a bit cumbersome but works. You can see an example at:


If you view the source, you'll see the script.


Gary P.
smily.gif
 
Hi mate,

Microsofts fix for that bug was to include a head tag at the top and the bottom of your page.

<HTML>
<HEAD>
<META HTTP-EQUIV=&quot;Pragma&quot; CONTENT=&quot;no-cache&quot;>
<TITLE>test</TITLE>
</HEAD>
<BODY>
Content.
</BODY>
<HEAD>
<META HTTP-EQUIV=&quot;Pragma&quot; CONTENT=&quot;no-cache&quot;>
</HEAD>
</HTML>

The reason for this was that IE read half the page before it actually processed the meta tag therefor, half of your page was already in the cache. If you use both head's then when the browser hits the bottom one then it will process that and remove any content that has been cached.

Hope this helps Wullie

 
Try putting these two lines on the top of your page...

<META HTTP-EQUIV=&quot;Expires&quot; CONTENT=&quot;Tue, 01 Jan 1980 1:00:00 GMT&quot;>
<META HTTP-EQUIV=&quot;Pragma&quot; CONTENT=&quot;no-cache&quot;>
Ladyhawk. [idea]
** ASP/VB/Java Programmer **
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top