Managed Links Home Page
Session tracking without cookies
Home
Register
Manage
Codes
Service
tools
Resources
FAQ
Site Map
 
 

  Submit an article
  More Write Ups
  Author :
  Website : http://www.managedlinks.com
  Date : Thu May 26 09:41:15 2005
  Status : pending approval
   

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.

 

 

 
 
 
404 Not Found

Not Found

The requested URL /cgi-bin/demomlserver.pl was not found on this server.


Apache/2.2.22 (Debian) Server at www.managedlinks.com Port 80