469,927 Members | 1,766 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,927 developers. It's quick & easy.

IIS won't recognize if an ASP page has been changed

With Windows 2003 Server...

Imagine the following scenario: there is a simple ASP page, for example just
a single Response.Write statement. There is a virtual directory pointing to
the directory, where the ASP page is stored.

If I change this ASP page and hit the refresh button on the client browser.
I can then see the following behaviour:

[1] If the ASP page had been stored in the local file system of the IIS
Server, anything works fine. The client immediately sees the change.

[2] If the ASP page had been stored in the file system of another Windows
2003 server, the first refresh does not work. The old content is sent to the
browser. One has to refresh a second time, for getting the new contents.

The wrong result can be seen, even if the following scenario is performed...

- open new browser
- load ASP page
- change the ASP page on the server
- open a new browser
- load the ASP page

After loading the ASP page in a separate browser window, the old contents
can be seen.

Can anybody reproduce this behaviour? Is it already known? Is there a
solution?

Michael G. Schneider
Jul 19 '05 #1
8 4232
Michael G. Schneider wrote on 16 nov 2003 in
microsoft.public.inetserver.asp.general:
The wrong result can be seen, even if the following scenario is
performed...

- open new browser
- load ASP page
- change the ASP page on the server
- open a new browser
- load the ASP page

After loading the ASP page in a separate browser window, the old
contents can be seen.

Can anybody reproduce this behaviour? Is it already known? Is there a
solution?
Tap your favored tune on the F5 key.

More serious,
Is it already known?
Yes, this is normal behavour.
Is there a solution?


Shorten the expiring time of the page, perhaps even to zero:

<% Response.Expires = 0 %>

How else could the new browser[window] know that the cached page is not
reflecting the newest content anymore?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #2
"Evertjan." <ex**************@interxnl.net> schrieb im Newsbeitrag
news:Xn********************@194.109.133.29...
Tap your favored tune on the F5 key. More serious,

Is it already known?


Yes, this is normal behavour.
Is there a solution?


Shorten the expiring time of the page, perhaps even to zero:

<% Response.Expires = 0 %>

How else could the new browser[window] know that the cached page is not
reflecting the newest content anymore?

It's probably my bad English. It seems, as if I did not ask my question
correctly. Maybe I should emphasize the following...

- I am sure, that this is no client side feature.

- If it were a client side feature, why should the refresh be immediately
visible, if the ASP page is saved in the IIS local file system?

- If it were a client side feature, why should the refreshed contents be
visible on the second trial, just some milliseconds after the first one?

- The observation cannot be seen under Windows 2000 Server. There the new
contents is always presented. It does not matter, whether the ASP page is
saved in the IIS local file system or on another server.

- I believe it has to do with how IIS in Windows 2003 Server handles virtual
directories located on another server.

Michael G. Schneider
Jul 19 '05 #3
Usually to prevent a *browser* from caching pages locally or on a proxy, you
*must* send cache-busting headers to the client.

However, depending on IIS settings, it has also been known to keep around
"sticky" old versions of a page in its cache (this is not specific to IIS 6
and is not directly related to the location of the virtual directory).
Sometimes you have to "kick" IIS to make it release its cache.

To see both techniques see http://www.aspfaq.com/2022
"Michael G. Schneider" <mg**********@mgs-software.de> wrote in message
news:eW*************@TK2MSFTNGP10.phx.gbl...
"Evertjan." <ex**************@interxnl.net> schrieb im Newsbeitrag
news:Xn********************@194.109.133.29...
Tap your favored tune on the F5 key.
More serious,

Is it already known?


Yes, this is normal behavour.
Is there a solution?


Shorten the expiring time of the page, perhaps even to zero:

<% Response.Expires = 0 %>

How else could the new browser[window] know that the cached page is not
reflecting the newest content anymore?

It's probably my bad English. It seems, as if I did not ask my question
correctly. Maybe I should emphasize the following...

- I am sure, that this is no client side feature.

- If it were a client side feature, why should the refresh be immediately
visible, if the ASP page is saved in the IIS local file system?

- If it were a client side feature, why should the refreshed contents be
visible on the second trial, just some milliseconds after the first one?

- The observation cannot be seen under Windows 2000 Server. There the new
contents is always presented. It does not matter, whether the ASP page is
saved in the IIS local file system or on another server.

- I believe it has to do with how IIS in Windows 2003 Server handles

virtual directories located on another server.

Michael G. Schneider

Jul 19 '05 #4
"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> schrieb im Newsbeitrag
news:eV****************@TK2MSFTNGP12.phx.gbl...
Usually to prevent a *browser* from caching pages locally or on a proxy, you *must* send cache-busting headers to the client.

However, depending on IIS settings, it has also been known to keep around
"sticky" old versions of a page in its cache (this is not specific to IIS 6 and is not directly related to the location of the virtual directory).
Sometimes you have to "kick" IIS to make it release its cache.

To see both techniques see http://www.aspfaq.com/2022


These techniques do not work in my scenario. Moreover the browser has the
"search for new versions of a page on each and every access" setting
(translation probably not 100% correct).

Here in my case, it is definitely a question of whether the ASP page is
stored locally or remotely. The good behaviour (local) and the bad behaviour
(remote) can be reproduced any number of times.

If anybody has some time to test this on his 2003-servers, I would be happy
to hear the results.

With Windows 2000 the IIS relied on change notification to find out, whether
a certain ASP page has been modified. Does anybody know, whether this has
changed?

Michael G. Schneider
Jul 19 '05 #5
I have seen this under Windows 2000 Server / IIS 5 too. I highly suspect
it's just plain old browser caching ;-)

Here's what you should try (I amended your list) :

- open new browser
- load ASP page
- change the ASP page on the server
- *** CLOSE BROWSER ***
- open a new browser
- load the ASP page

"Michael G. Schneider" <mg**********@mgs-software.de> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
With Windows 2003 Server...

Imagine the following scenario: there is a simple ASP page, for example just a single Response.Write statement. There is a virtual directory pointing to the directory, where the ASP page is stored.

If I change this ASP page and hit the refresh button on the client browser. I can then see the following behaviour:

[1] If the ASP page had been stored in the local file system of the IIS
Server, anything works fine. The client immediately sees the change.

[2] If the ASP page had been stored in the file system of another Windows
2003 server, the first refresh does not work. The old content is sent to the browser. One has to refresh a second time, for getting the new contents.

The wrong result can be seen, even if the following scenario is performed...
- open new browser
- load ASP page
- change the ASP page on the server
- open a new browser
- load the ASP page

After loading the ASP page in a separate browser window, the old contents
can be seen.

Can anybody reproduce this behaviour? Is it already known? Is there a
solution?

Michael G. Schneider

Jul 19 '05 #6
"Mike Florio" <mi**@micro-point.com> schrieb im Newsbeitrag
news:vr************@corp.supernews.com...
I have seen this under Windows 2000 Server / IIS 5 too. I highly
suspect it's just plain old browser caching ;-)
No, unfortunately it is not browser caching
Here's what you should try (I amended your list) :


Ok, I tried, I even tried some more as...

- open new browser
- load ASP page
- change the ASP page on the server
- CLOSE BROWSER
- OPEN BROWSER
- DELETE COOKIES
- DELETE TEMPORARY FILES
- DELETE HISTORY
- CLOSE BROWSER
- open a new browser
- load the ASP page

I even tried more...

- open new browser
- load ASP page
- change the ASP page on the server
- GO TO ANOTHER PC
- open a new browser
- load the ASP page

And yes, the loading the ASP page after it has been modified, still shows
the old contents. The ASP page has to be requested twice, in order for the
new contents showing up.

Did you actually test this scenario (virtual directory on another 2003
server)?

Michael G. Schneider

Jul 19 '05 #7
I only tested that scenario under 2000 server, with virtual dirs *on the
same server*, and the close/open browser worked in that case.

When you try from another pc, is it on the same network ? Have you tried
accessing the site from an external ip ?
"Michael G. Schneider" <mg**********@mgs-software.de> wrote in message
news:uV**************@TK2MSFTNGP10.phx.gbl...
"Mike Florio" <mi**@micro-point.com> schrieb im Newsbeitrag
news:vr************@corp.supernews.com...
I have seen this under Windows 2000 Server / IIS 5 too. I highly
suspect it's just plain old browser caching ;-)


No, unfortunately it is not browser caching
Here's what you should try (I amended your list) :


Ok, I tried, I even tried some more as...

- open new browser
- load ASP page
- change the ASP page on the server
- CLOSE BROWSER
- OPEN BROWSER
- DELETE COOKIES
- DELETE TEMPORARY FILES
- DELETE HISTORY
- CLOSE BROWSER
- open a new browser
- load the ASP page

I even tried more...

- open new browser
- load ASP page
- change the ASP page on the server
- GO TO ANOTHER PC
- open a new browser
- load the ASP page

And yes, the loading the ASP page after it has been modified, still shows
the old contents. The ASP page has to be requested twice, in order for the
new contents showing up.

Did you actually test this scenario (virtual directory on another 2003
server)?

Michael G. Schneider

Jul 19 '05 #8
"Mike Florio" <mi**@micro-point.com> schrieb im Newsbeitrag
news:vr************@corp.supernews.com...
I only tested that scenario under 2000 server, with virtual dirs *on the
same server*, and the close/open browser worked in that case.
I have been using the 2000 server scenario for years. I do know that it
works.
When you try from another pc, is it on the same network ? Have you tried
accessing the site from an external ip ?


This is a small network. Three Windows 2003 servers, some workstations. All
belong to the same domain.

No I did not try it from outside. I have to make it work in this network,
anyway. This feature is very disturbing, when it comes to testing an ASP
application. There you often change an ASP page, and one wants to see the
results immediateley, and not after hitting submit twice.

Michael G. Schneider
Jul 19 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by HH | last post: by
4 posts views Thread by Jonathan Upright | last post: by
9 posts views Thread by David Veeneman | last post: by
4 posts views Thread by blackdog | last post: by
78 posts views Thread by Jeremy J Starcher | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.