Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/172896

From BetaArchive Wiki
Knowledge Base

Article ID: 172896

Article Last Modified on 5/2/2006


  • Microsoft Visual InterDev 1.0 Standard Edition

This article was previously published under Q172896


When you use the Preview in Browser command on an .asp or .htm file, an older version of the file is displayed, and the changes that you made appear to be lost.


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, the updated files are not be displayed.


To work around this problem, use one of the following methods:

  • From the user side, change the cache settings of the browser as follows:
    1. On the Tools menu, click Internet Options.
    2. In the Temporary Internet Files section, click Settings.
    3. Click any option other than Never. The page should then display correctly.
  • From the server side, include the following line:

    Response.Expires = 0 

    at the top of the page in .asp files. This prevents any browser from displaying the cached version of the file. Note that this only works for .asp files.

  • If there is a difference between the client and server time where the client time is earlier than the server time, use the following line:

    Response.ExpiresAbsolute = [date] [time] 

    instead of:

    Response.Expires = 0 

    to indicate immediate expiration of the page.

  • 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" %>

NOTE: An important caveat is that Internet Explorer does 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.


This behavior is by design.


To reproduce this problem, preview an .asp or .htm file that has just been changed. The changes do not appear in the browser if the file is cached somewhere.


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

172897 PRB: Link Repair Does Not Work Within HTML Layout (*.alx) 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:

Keywords: kbextension kbide kbprb kbserver kbwebserver KB172896