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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.