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

Discussion in 'ASP General' started by Michael G. Schneider, Nov 16, 2003.

  1. 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
     
    Michael G. Schneider, Nov 16, 2003
    #1
    1. Advertising

  2. Michael G. Schneider

    Evertjan. Guest

    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)
     
    Evertjan., Nov 16, 2003
    #2
    1. Advertising

  3. "Evertjan." <> 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
     
    Michael G. Schneider, Nov 16, 2003
    #3
  4. 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" <> wrote in message
    news:...
    > "Evertjan." <> 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
    >
    >
     
    Aaron Bertrand [MVP], Nov 16, 2003
    #4
  5. "Aaron Bertrand [MVP]" <> schrieb im Newsbeitrag
    news:eV%...
    > 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
     
    Michael G. Schneider, Nov 16, 2003
    #5
  6. "Mike Florio" <> schrieb im Newsbeitrag
    news:...

    > 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
     
    Michael G. Schneider, Nov 19, 2003
    #6
  7. "Mike Florio" <> schrieb im Newsbeitrag
    news:...

    > 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
     
    Michael G. Schneider, Nov 19, 2003
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. David Veeneman

    IIS won't recognize Default.aspx

    David Veeneman, Jan 14, 2006, in forum: ASP .Net
    Replies:
    9
    Views:
    17,812
    David Veeneman
    Jan 17, 2006
  2. Rob Baxter
    Replies:
    3
    Views:
    549
    Oscar kind
    Jul 28, 2004
  3. Marco Krechting

    NEWBIE: check if page has been changed

    Marco Krechting, Jan 7, 2005, in forum: Java
    Replies:
    2
    Views:
    761
    Andrew Thompson
    Jan 7, 2005
  4. nomad
    Replies:
    0
    Views:
    279
    nomad
    Aug 7, 2008
  5. Michael G. Schneider
    Replies:
    1
    Views:
    108
    Bob Barrows
    Dec 9, 2003
Loading...

Share This Page