Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Dummies Guide to Sessions/Cookies


damo2576

Recommended Posts

Posted

Thats what I need....

 

So far from reading docs and round here I understand that sessions are what remember what each users does, places in his basket etc.

 

The session can be stored in a cookie or with the session id in the url.

 

Is that right?

 

I don't understand the pros and cons of each method though. Can someone explain?!

 

Thanks in advance

 

Damo

Posted

Yes a session can be stored in a cookie or passed in the url.

 

Some people do not have cookies enabled though so forcing cookies will block some people from the site (actually they will get a nice little screen that says they need to enable cookies).

 

Basically the way it works is that it will always try to create a cookie and if it can not it will pass it in the url.

 

The bad part about passing the id in the url is that if someone cuts and pastes the url in their browser then sends that to someone else, the other person can then access that particular session if it has not expired. Also, you have to enable Prevent Spider Sessions in admin so that spiders do not open sessions and build big shopping carts as they spider your site.

Archived

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

×
×
  • Create New...