Sessions or cookies

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jaymoore_299
Forum Contributor
Posts: 128
Joined: Wed May 11, 2005 6:40 pm
Contact:

Sessions or cookies

Post by jaymoore_299 »

I'm looking to track how each surfer clicks based on the referrer he came from. There is no login, this is just for click tracking. For sites that get lots of traffic, does using sessions put a high load on the server that may lead to slower loading, or more vulnerability to crash? What are the pros/cons of each?

I was thinking of using sessions because not all browsers accept cookies, so I would have a more accurate picture of the traffic.
php_wiz_kid
Forum Contributor
Posts: 181
Joined: Tue Jun 24, 2003 7:33 pm

Post by php_wiz_kid »

Sessions require cookies to be enabled unless you send the session id as a url query string.

I don't think either one puts that much of a "load" on the server. You could probably go with either one. The only reason I'd use a cookie is if I want to try and retrieve data later after they leave the site or shutdown their browser.
Post Reply