|
|
While pondering ways to create session ids I struck on the following thought.
I have not seen it done or even written about so maybe its a new idea.
First all links within your site would need to be converted to relative links. not hard with most site editing tools using global replace
second when someone enters your site they are redirected to a new URL, the URL contains a session tracking id in the form of
http://www.mysite.com/sid1234/index.htm
Thirdly the webserver then simply rewrites every access to the site so
http://www.mysite.com/sid1234/index.htm
becomes
http://www.mysite.com/index.htm?sid=1234
This maintains a session without any need to use a database or messy tracking strings which need to be added to every link on the site.
The one major drawback I see is search engine spiders they will see a different directory structure but the same content every time they enter the site
You would need to prevent the process from occuring when a spider is detected, not hard for the major spiders, and if your redirection script was smart enough it could detect any new spiders.
sessions would become easily identifiable using the standard logs as the session id would be written into them
A user could start a new session by opening another browser and starting from scratch but "open in another window" would replicate the session
Another drawback is making sure everyone is correctly redirected even if they fail to enter the site through your main page.
A small php script in the head of each page would fix that, if it finds a session id it does nothing, if it doesnt it does a bot check, if that fails it redirects to a new session
Under apache all you have to do is add the script to each page, and if the page is a html page change the handler to PHP something I do regularly.
article keywords:
session tracking
,
cookies,sessions,visitor tracking
Disclaimer: The information presented and opinions expressed herein
are those of the authors
and do not necessarily represent the views of Managed Links and/or its
partners.
|
|
|
|