Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > IIS won't recognize if an ASP page has been changed

Reply
Thread Tools

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

 
 
Michael G. Schneider
Guest
Posts: n/a
 
      11-16-2003
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


 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      11-16-2003
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)
 
Reply With Quote
 
 
 
 
Michael G. Schneider
Guest
Posts: n/a
 
      11-16-2003
"Evertjan." <(E-Mail Removed)> schrieb im Newsbeitrag
news:Xns9435942B3ABA6eejj99@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


 
Reply With Quote
 
Aaron Bertrand [MVP]
Guest
Posts: n/a
 
      11-16-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Evertjan." <(E-Mail Removed)> schrieb im Newsbeitrag
> news:Xns9435942B3ABA6eejj99@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
>
>



 
Reply With Quote
 
Michael G. Schneider
Guest
Posts: n/a
 
      11-16-2003
"Aaron Bertrand [MVP]" <(E-Mail Removed)> schrieb im Newsbeitrag
news:eV%(E-Mail Removed)...
> 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


 
Reply With Quote
 
Michael G. Schneider
Guest
Posts: n/a
 
      11-19-2003
"Mike Florio" <(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed)...

> 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



 
Reply With Quote
 
Michael G. Schneider
Guest
Posts: n/a
 
      11-19-2003
"Mike Florio" <(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed)...

> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The printing has been stopped and this job has been add to the queu? dejola Computer Support 6 12-30-2005 03:26 AM
NEWBIE: check if page has been changed Marco Krechting Java 2 01-07-2005 11:15 AM
Homepage has been changed Howard Dickerson Computer Support 2 09-27-2004 11:04 PM
determining when a file has been moved/changed Rob Baxter Java 3 07-28-2004 03:54 PM
IIS won't recognize if an ASP page has been changed - solution Michael G. Schneider ASP General 1 12-09-2003 02:38 PM



Advertisments