Expiring a web page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sandman

    Expiring a web page

    How do I make sure that the user goes "back" to an expired webpage? Is
    there a way to trap the Back button and load a different page with the
    "page has expired" message?

    margaret

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
  • Guest's Avatar

    #2
    Expiring a web page

    You could set the page headers such that the page expires
    immediately. Look at Microsoft Knowledge Base Article -
    234067 .
    Basically , you would use the following :
    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="-1">
    In ASP , it owuld be :
    <% Response.CacheC ontrol = "no-cache" %>>
    <% Response.AddHea der "Pragma", "no-cache" %>
    <% Response.Expire s = -1 %>[color=blue]
    >-----Original Message-----
    >How do I make sure that the user goes "back" to an[/color]
    expired webpage? Is[color=blue]
    >there a way to trap the Back button and load a different[/color]
    page with the[color=blue]
    >"page has expired" message?
    >
    >margaret
    >
    >*** Sent via Developersdex http://www.developersdex.com[/color]
    ***[color=blue]
    >Don't just participate in USENET...get rewarded for it!
    >.
    >[/color]

    Comment

    • Alvin Bruney

      #3
      Re: Expiring a web page

      what you want to do is
      Cache.SetCachea bility(HttpCach eability.Server AndNoCache);

      followed by a Response.End();

      This will trap the user on the page.


      --


      -----------
      Got TidBits?
      Get it here: www.networkip.net/tidbits
      "sandman" <anonymous@devd ex.com> wrote in message
      news:ewCyoAxoDH A.1020@TK2MSFTN GP09.phx.gbl...[color=blue]
      > How do I make sure that the user goes "back" to an expired webpage? Is
      > there a way to trap the Back button and load a different page with the
      > "page has expired" message?
      >
      > margaret
      >
      > *** Sent via Developersdex http://www.developersdex.com ***
      > Don't just participate in USENET...get rewarded for it![/color]


      Comment

      • sandman

        #4
        Re: Expiring a web page

        <<Cache.SetCach eability(HttpCa cheability.Serv erAndNoCache);
        Response.End(); >>

        Where do I do this? The bulk of the code is in the C# code-behind page.


        margaret

        *** Sent via Developersdex http://www.developersdex.com ***
        Don't just participate in USENET...get rewarded for it!

        Comment

        • Chris

          #5
          Re: Expiring a web page

          You can do this in the page, as a page directive, or in the code-behind.
          Either one is supposed to work just as well as the other. Since you've got
          most of the code in the code-behind page, it's probably best just to put the
          caching calls there, too. You can specify in the Page_Load() method.

          I just read an article on this: www.visualstudiomagazine.com ; the article
          locator code is VS0311AN_D

          "sandman" <anonymous@devd ex.com> wrote in message
          news:e$B2WY7rDH A.556@TK2MSFTNG P11.phx.gbl...[color=blue]
          > <<Cache.SetCach eability(HttpCa cheability.Serv erAndNoCache);
          > Response.End(); >>
          >
          > Where do I do this? The bulk of the code is in the C# code-behind page.
          >
          >
          > margaret
          >
          > *** Sent via Developersdex http://www.developersdex.com ***
          > Don't just participate in USENET...get rewarded for it![/color]


          Comment

          Working...