Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Dec 2004
    Location
    Jamaica
    Posts
    592
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Internet Explorer Warning: Page Expired

    I don't know if I'm posting this in the right forum. If I'm not let me know. But part of me tells me that the answer to my question resides within the coding capabilities of ASP........


    I'm doing up a messaging system. After the user deletes the message I want the user to be unable to go Back... as i, if they hit the back button in their browser it shoots up the "Warning: Page Expired" page.


  • #2
    New Coder
    Join Date
    May 2004
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Put this at the top of the page you want to expire and it should work.

    Code:
    <%
    Response.Expires = 60
    Response.Expiresabsolute = Now() - 1
    Response.AddHeader "pragma","no-cache"
    Response.AddHeader "cache-control","private"
    Response.CacheControl = "no-cache"
    Response.CacheControl = "no-cache" 
    Response.AddHeader "Pragma", "no-cache" 
    Response.Expires = -1 
    %>

  • #3
    Regular Coder
    Join Date
    Dec 2004
    Location
    Jamaica
    Posts
    592
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Thumbs up

    THanks alot man!

    Hey there's one other thing.
    When users sign out of my system. It takes them to a signout.asp page that deletes their record from the database that would signify activity.

    I've put a redirect to carry the users to another page right? I dropped the code on the signout page. But users click Back it takes them back in?

    It is because of the redirect? How would i delay the redirect?

  • #4
    Regular Coder
    Join Date
    Dec 2004
    Location
    Jamaica
    Posts
    592
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Exclamation


    I have yet another concern.... I have designed a messaging sytem right....

    WHen the user is in their inbox i don't wanna necessarily have the code u supplied at the top of the page because I want the users to be able to use the back button to come out of a message for example and return to the listing of messages (their inbox).

    But then if they click the Delete button, it deletes the message and then reloads the page. I want the page they came from to expire!

    How would I do that?

    Also, is there a way to say delete/make all pages expire when the user signs out? So that despite how many times the back button is pressed they won't end back up in their inbox!


  •  

    Posting Permissions

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