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 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2002
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Only open new location 1st time.

    I have a login screen that opens a customer services page. I have logic that opens a different location for certain customers which works fine. The problem is that when the user clicks the back button for the initial customer service page it throws them back to the other location because of my logic. Is there a way that I only throw this page the first time I land on the customer service page?

    In other words we want to throw certain customers this special page, but they need to be able to navigate to the customer service page as well.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Set a "session cookie", to indicate they've been redirected once and then don't redirect if the cookie is present. As a session cookie goes away when the browser is closed, the next time they visit (assuming they've actually closed the browser) they get redirected again. You can also fairly short cookie expiration to overcome the "they didn't close the browser between visits" problem as well.
    Check out the Forum Search. It's the short path to getting great results from this forum.

  • #3
    New Coder
    Join Date
    Aug 2002
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks Roy. That is what I finally figured out as well. I wasn't familer with cookies using javascript, so this was an enlightening process.

    Thanks again!!!
    Ray


  •  

    Posting Permissions

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