IE using cached pages instead of posting to server

Discussion in 'ASP .Net' started by James E, Dec 3, 2004.

  1. James E

    James E Guest

    I have an asp.net web application. On each page of the web app, is a web
    user control that is used for navigation.

    The web user control contains a DHTML menu that is poulated at run time by
    an xml file.

    My problem is that if Internet Explorers general settings for 'check for
    newer versions of stored pages' is set to 'Automatically', IE does not
    request a new copy of the page from the server after the page has been
    loaded the first time.

    Is there any way I can detect this in my application and force IE, NOT to
    use it's cached copy of the page???

    Cheers

    JamesE
    James E, Dec 3, 2004
    #1
    1. Advertising

  2. James E

    James E Guest

    Sorted it....

    I added the line:

    Response.Cache.SetExpires(DateTime.Now);

    which solves the problem...




    "James E" <> wrote in message
    news:%...
    >I have an asp.net web application. On each page of the web app, is a web
    >user control that is used for navigation.
    >
    > The web user control contains a DHTML menu that is poulated at run time by
    > an xml file.
    >
    > My problem is that if Internet Explorers general settings for 'check for
    > newer versions of stored pages' is set to 'Automatically', IE does not
    > request a new copy of the page from the server after the page has been
    > loaded the first time.
    >
    > Is there any way I can detect this in my application and force IE, NOT to
    > use it's cached copy of the page???
    >
    > Cheers
    >
    > JamesE
    >
    James E, Dec 3, 2004
    #2
    1. Advertising

  3. Also use the no-cache pragma
    this is the best option in these situations

    Ran Davidovitz
    Web Developer
    Verint


    "James E" <> wrote in message
    news:%...
    >I have an asp.net web application. On each page of the web app, is a web
    >user control that is used for navigation.
    >
    > The web user control contains a DHTML menu that is poulated at run time by
    > an xml file.
    >
    > My problem is that if Internet Explorers general settings for 'check for
    > newer versions of stored pages' is set to 'Automatically', IE does not
    > request a new copy of the page from the server after the page has been
    > loaded the first time.
    >
    > Is there any way I can detect this in my application and force IE, NOT to
    > use it's cached copy of the page???
    >
    > Cheers
    >
    > JamesE
    >
    Ran Davidovitz, Dec 4, 2004
    #3
    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. Jim
    Replies:
    0
    Views:
    349
  2. Simon
    Replies:
    2
    Views:
    288
    Joerg Jooss
    Jul 17, 2004
  3. Craig G
    Replies:
    0
    Views:
    385
    Craig G
    Mar 7, 2005
  4. Adrian Parker

    Stopping pages from being cached.

    Adrian Parker, Mar 18, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    463
    Adrian Parker
    Mar 18, 2005
  5. JJ
    Replies:
    0
    Views:
    325
Loading...

Share This Page