How to Use Pragma: No-cache with IIS and IE

Last reviewed: November 6, 1997
Article ID: Q165150

The information in this article applies to:

  • Microsoft Internet Information Server version 3.0

SUMMARY

To prevent Microsoft Internet Explorer (IE) clients from caching web pages, it may be necessary to use the Pragma: No-cache header.

MORE INFORMATION

The following script code can be used in a Microsoft Active Server Page (ASP) to insert the Pragma: No-cache tag into the HTTP header.

NOTE: This script code MUST be the first line of the ASP file.

<% Response.AddHeader "Pragma", "No-Cache" %>

Keywords          : iishowto kbinterop kbhowto
Version           : Winnt:3.0
Platform          : winnt
Hardware          : ALPHA x86
Issue type        : kbhowto


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 6, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.