PRB: Browser Doesn't Show Most Recent Versions of .htm/.asp FilesID: Q172896
|
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.
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.
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 there is a difference between the client and server time where the
client time is earlier than the server time, use "<%
Response.ExpiresAbsolute = [date] [time] %>" instead of the "<%
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" %>
This behavior is by design.
For additional information, please see the following article in the
Microsoft Knowledge Base:
Q172897 PRB: Link Repair Does Not Work Within HTML Layout Files
http://support.microsoft.com/support/vinterdev/
Additional query words:
Keywords : kbExtension kbFrontPage kbServer kbVisID100 kbWebServer kbGrpASP
Version : WINDOWS:1.0
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: July 13, 1999