• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Session Tracking

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can Someone elucidate what is Session Tracking ?

Thanks in advance
Regards,
 
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The HTTP protocol is by design, stateless. That means that if you call a web page on a site and then click on another, the server doesn't remember that you visited the previous page.
You can see how a shopping cart could not be maintained that way so there has to be some way of TRACKING what the user is doing. The HTTP protocol as I said is stateless so something had to be invented to track the "motion" of a user in a web site.
Cookies are one way of doing this. When you go to a site for the first time, a cookie is sent to your browser that says (for example) "this is session ID ANBVVSTTTTYYYYY121u867ttt". The server then starts a "file" on that session ID.
Every time you click on a link on the site, the cookie (i.e., the session ID) is sent back to the server without you having to do anything special; this is the way browsers are designed. The server then "knows" What You Did Last Summer; I mean what you have seen so far on the site
If it wasn't for Session Tracking, every click by the same user on a page would be unrelated to every other click: That's what "stateless" means.
Cookies are not, repeat, NOT the only way to implement session tracking!
In fact it would be stupid for an e-commerce site to depend exclusively on Cookies for session tracking. That's because a lot of people are paranoid and disable cookies in their browsers.
The fear is overblown, IMHO.
Another simple but very effective way to do session tracking is what is called "URL re-writing".
This consists of appending the session ID to EVERY (and it has to be every!) URL sent to the client in the site pages. That way when you click, the session ID is sent to the server as part of the URL that you clicked as in, e.g.
http://www.officedepot.com/catalog?SID=ANBVVSTTTTYYYYY121u867ttt
reply
    Bookmark Topic Watch Topic
  • New Topic