Jump to Real's How-to Main page

Instruct the browser to bypass the Cache

Put that in the HEAD section of the HTML page
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
However, MS IE (almost all versions) do not process the instruction properly due to the cache mechanism.

The workaround is to included a second <HEAD> section at the bottom of the page (no joke!).

<HTML><HEAD>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<META HTTP-EQUIV="REFRESH" CONTENT="5">
<TITLE> Demonstration Pragma No-cache </TITLE>
</HEAD><BODY>
This page has 2 HEAD sections to properly bypass the cache in all browser.
</BODY>
<HEAD>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD>
</HTML>
NOTE: the above example uses META HTTP-EQUIV="REFRESH" to make the browser reload the page automatically after 5 seconds, this is for demonstration purpose only (to see that the cache is actually bypassed). This has nothing with the bypassing of the cache itself.

ref : http://support.microsoft.com/kb/q222064/

See also this HowTo.


If you find this article useful, consider making a small donation
to show your supportfor this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2007
[ home ]