Microsoft Knowledge Base

How to use Pragma: No-Cache with IIS and IE

Last reviewed: October 21, 1997
Article ID: Q164673
The information in this article applies to:
  • Microsoft Internet Information Server, version 3.0

To prevent most Web browsers' clients from caching Web pages, it may be necessary to use the Pragma: No-cache header.

The following code can be used in an Active Server Page to insert the Pragma: No-cache tag into the HTTP header. This script code MUST be the first line of the ASP file.

   <% Response.AddHeader "Pragma", "No-Cache" %>
Keywords          : iishowto
Version           : winnt:3.0
Platform          : winnt


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


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: October 21, 1997
©1997 Microsoft Corporation. All rights reserved. Legal Notices.