PRB: Browser Doesn't Show Most Recent Versions of htm/asp Files

Last reviewed: December 11, 1997
Article ID: Q172896
The information in this article applies to:
  • Microsoft Visual InterDev, version 1.0

SYMPTOMS

When using the Preview in Browser command on an .asp or .htm file, an older version of the file is seen, and the changes made seem to have been lost.

CAUSE

This is caused by the cache settings in the browser or the proxy server. If the browser is set to look only for cached versions, or if the proxy server is set to cache files, then the updated files will not be seen.

RESOLUTION

There are a few ways to work around this. From the user side, change the caching settings of the browser. To change this, click Options from the View menu, then click Advanced and "Temporary Internet Files - Settings." Select an option other than "Never." The page should then display correctly. To correct this from the server side, include the line "<% Response.Expires = 0 %>" at the top of the page in .asp files. This will keep any browser from displaying the cached version of the file. Note that this will work only for .asp files.

If you are working through a proxy server, the following lines should keep most proxy servers from caching the page:

   <% Response.AddHeader "cache-control", "private" %>
   <% Response.AddHeader " pragma", "no-cache" %>

An important caveat is that Internet Explorer will not look for a new version if the same file that is requested through Visual InterDev's Preview in Browser is the file that is currently displayed in the browser's window. Internet Explorer takes focus but does not look for a more recent version no matter what the Cache Settings are. Using the browser's "Refresh" button gets the new contents.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

Preview an .asp or .htm file that has just been changed. The changes will not show up in the browser if the file is cached somewhere.

REFERENCES

For additional information, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q172897
   TITLE     : PRB: Link Repair Does Not Work Within HTML Layout Files

For the latest Knowledge Base articles and other support information on Visual InterDev and Active Server Pages, see the following page on the Microsoft Technical Support site:

   http://support.microsoft.com/support/vinterdev/

Keywords          : VIFPSE
Version           : WINDOWS:1.0
Platform          : WINDOWS
Issue type        : kbprb


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


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: December 11, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.