Stopping pages from being cached.

A

Adrian Parker

IE.. Tools -> Internet Options -> Settings Button ->
Check for newer versions of stored pages = Never

If a user changes thier settings to this, then pages are cached in IE.

From what we've found, you have to use the following Meta tags in the HEAD
section to stop it doing it.

meta http-equiv="Pragma" content="no-cache"
meta http-equiv="Expires" content="0"

However, due to a nice feature, if the page is less than 64k, you have to
add a 2nd HEAD section after the BODY and include the two meta tags again.
e.g.

<HTML>
<HEAD>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
</HEAD>
<BODY>
yada yada yada
</BODY>
<HEAD>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
</HEAD>
</HTML>

else the pages are still cached.

To get the thing working and out there, I've added the 2nd head tags to each
aspx page.

Is there a better way of doing this?

Thanks
Adrian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,737
Latest member
Georgeengab

Latest Threads

Top