Results 1 to 6 of 6

Thread: how to disable the page if user push 'back'

  1. #1

    Thread Starter
    Hyperactive Member temp_12000's Avatar
    Join Date
    Jan 2004
    Location
    LA, USA
    Posts
    411

    Question how to disable the page if user push 'back'

    how to disable the page if user push 'back'

    I have an aspx page. A user can push 'logout' button to logout. However, after logout, if the user push 'back' botton in IE's menu, the IE will show the aspx page before logout. How can I prevent this? So, after logout, even user push 'back', it won't show the page.

    thanks



  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    VB Code:
    1. Response.Cache.SetCacheability(HttpCacheability.NoCache)

  3. #3
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018
    I didn't know that.
    Nice one froggo

    Parksie

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    What do you normally use?

  5. #5

    Thread Starter
    Hyperactive Member temp_12000's Avatar
    Join Date
    Jan 2004
    Location
    LA, USA
    Posts
    411
    Originally posted by mendhak
    VB Code:
    1. Response.Cache.SetCacheability(HttpCacheability.NoCache)
    thanks. however, where should I use it?

    For example, I have 3 pages,
    1st is for login, 2nd is for some processing, 3rd is for logout.
    on the 2nd page, it has some buttons. when users push button, it will do some computation. Now, I put
    Response.Cache.SetCacheability(HttpCacheability.NoCache)

    at the beginning of each page's page_load event. after users logout, if the user push 'back' on IE, it shows 'the page expires .....'. However, if the user push 'back' again, the 2nd page shows up and the user can still use those buttons to do computations.

    Is there a sample project for using
    Response.Cache.SetCacheability(HttpCacheability.NoCache)

    thank you very much.



  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Here's a sample:

    http://samples.gotdotnet.com/quickst...utcaching.aspx

    I could suggest another way...


    <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Expires" CONTENT="-1">

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width