king arthur Posted November 3, 2006 Share Posted November 3, 2006 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 https://forums.phpfreaks.com/topic/26054-session-id-appears-in-url-on-second-pageload-every-visit/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.