How to set when "Check for newer versions of stored pages" happens

Discussion in 'ASP .Net' started by =?Utf-8?B?RWQgU3RhZmZpbg==?=, Feb 8, 2006.

  1. In Internet Explorer under the tools/internet options menu on the general
    tab, there is a settings button under Temporary internet files. In there the
    user can specify when to "Check for newer versions of stored pages." I want
    to make sure that my pages are refreshed every time they visit regardless of
    this setting. Is there a way to do this? Thanks ... Ed
     
    =?Utf-8?B?RWQgU3RhZmZpbg==?=, Feb 8, 2006
    #1
    1. Advertising

  2. Hi Ed,

    You can try adding headers to your pages so that servers and browsers don't
    store them, but there's no guarantee they'll honour this. Here's some code
    to try:

    Private Sub Page_Load _
    (ByVal sender As System.Object, ByVal e As _
    System.EventArgs) Handles MyBase.Load
    Response.Expires = 0
    Response.AddHeader("Pragma", "no-cache")
    Response.AddHeader("cache-control", "no-store")
    Response.ExpiresAbsolute = DateTime.Now.ToString
    End Sub

    Ken
    Microsoft MVP [ASP.NET]

    "Ed Staffin" <> wrote in message
    news:D...
    > In Internet Explorer under the tools/internet options menu on the general
    > tab, there is a settings button under Temporary internet files. In there
    > the
    > user can specify when to "Check for newer versions of stored pages." I
    > want
    > to make sure that my pages are refreshed every time they visit regardless
    > of
    > this setting. Is there a way to do this? Thanks ... Ed
    >
     
    Ken Cox - Microsoft MVP, Feb 8, 2006
    #2
    1. Advertising

  3. Re: How to set when "Check for newer versions of stored pages" hap

    I'm also running into the same issue. I'm beta testing a product for a client
    on our server. I'm using master pages in asp.net 2.0, and a menu control
    populated from sql server. My first screen is a login screen. The user logs
    in, which takes her to the default.aspx page. She visits a page on the site,
    and then logs off. Then she (who is an admin) logs in as someone else.
    Instead of taking her to the default.aspx page, it takes her back to the page
    she last visited.

    The only temporary solution that works is to have her change her IE settings
    so that the browser checks for newer pages "Every visit to the page." I say
    temporary because I really can't have her ask her users to change their
    browser settings.

    I've put your code in every Page_Load of the master pages, and
    Page_LoadComplete of the default.aspx page and login.aspx page, but I'm still
    having the same problem.

    Is there anything else that you might know of that will help? This will be a
    problem in every web project using asp.net 2.0!

    "Ken Cox - Microsoft MVP" wrote:

    > Hi Ed,
    >
    > You can try adding headers to your pages so that servers and browsers don't
    > store them, but there's no guarantee they'll honour this. Here's some code
    > to try:
    >
    > Private Sub Page_Load _
    > (ByVal sender As System.Object, ByVal e As _
    > System.EventArgs) Handles MyBase.Load
    > Response.Expires = 0
    > Response.AddHeader("Pragma", "no-cache")
    > Response.AddHeader("cache-control", "no-store")
    > Response.ExpiresAbsolute = DateTime.Now.ToString
    > End Sub
    >
    > Ken
    > Microsoft MVP [ASP.NET]
    >
    > "Ed Staffin" <> wrote in message
    > news:D...
    > > In Internet Explorer under the tools/internet options menu on the general
    > > tab, there is a settings button under Temporary internet files. In there
    > > the
    > > user can specify when to "Check for newer versions of stored pages." I
    > > want
    > > to make sure that my pages are refreshed every time they visit regardless
    > > of
    > > this setting. Is there a way to do this? Thanks ... Ed
    > >

    >
    >
    >
     
    =?Utf-8?B?UmljaGFyZA==?=, Apr 3, 2006
    #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. cg
    Replies:
    0
    Views:
    476
  2. Andreas Klemt
    Replies:
    0
    Views:
    478
    Andreas Klemt
    Jul 4, 2003
  3. Peter Rilling
    Replies:
    4
    Views:
    411
    Peter Rilling
    Aug 4, 2003
  4. NM
    Replies:
    6
    Views:
    480
    Default User
    Sep 20, 2006
  5. Replies:
    1
    Views:
    488
    Mark Rae [MVP]
    Sep 20, 2007
Loading...

Share This Page