Jump to content

Session ID appears in URL on second pageload every visit


king arthur

Recommended Posts

I am building a members website. To keep track of what visitors are doing even before they log in, I use a session on every page.

The thing I've noticed is that the session ID always gets appended to the URL on the second page any surfer visits. The obvious reason for this is that when the first page starts the session, there is no session cookie yet so it assumes that one wasn't accepted, and switches to passing the session ID by the URL until the next page, then it finds the session cookie.

So while it isn't a bug, it's something I'd rather not have appear, but I can't think of a way around it. I don't want to restrict sessions to use only cookies in case I get a member who has cookies blocked. I just wonder if anyone else has ever got round this, or how do other membership type sites do it? I could change to only starting sessions when the user has logged in, which bypasses the problem because the first thing they would hit is the login button rather than a link. But I'd like to see if there's any other way.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.