"Pragma: No-cache" Tag May Not Prevent Page from Being Cached

Article translations Article translations
Article ID: 222064 - View products that this article applies to.
This article was previously published under Q222064
Expand all | Collapse all

SYMPTOMS

When you use the <HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> metatag in the header section at the beginning of an HTML Web page, the Web page may still be cached in the Temporary Internet Files folder.

CAUSE

A page that Internet Explorer is browsing is not cached until half of the 64 KB buffer is filled. Usually, metatags are inserted in the header section of an HTML document, which appears at the beginning of the document. When the HTML code is parsed, it is read from top to bottom. When the <HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> metatag is read, Internet Explorer looks for the existence of the page in cache at that exact moment. If it is there, it is removed.

RESOLUTION

To properly prevent the Web page from appearing in the cache, place another header section at the end of the HTML document. For example:

<HTML>

<HEAD>

<META HTTP-EQUIV="REFRESH" CONTENT="5">
<TITLE> Pragma No-cache </TITLE>
</HEAD>

<BODY>

This is an example of where to place the second header section<br>
so that the "Pragama, No-Cache" metatag will work as it is supposed to.<br>

</BODY>

<HEAD>

<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
</HEAD>

</HTML>

MORE INFORMATION

Note that the <HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> metatag does not work with Internet Explorer 5. For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
234067 HOWTO: Prevent Caching in Internet Explorer

Properties

Article ID: 222064 - Last Review: February 23, 2004 - Revision: 4.0
APPLIES TO
  • Microsoft Internet Explorer 4.01 Service Pack 1
  • Microsoft Internet Explorer 4.01 Service Pack 1
  • Microsoft Internet Explorer 4.0 128-Bit Edition
  • Microsoft Internet Explorer 4.0 128-Bit Edition
  • Microsoft Internet Explorer 3.02
Keywords: 
kbprb kbprogramming KB222064
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com