Forum Moderators: buckworks
a) Cookies saved to Hard Drive
b) Cookies saved to RAM
c) Session Variables
d) 3rd Party Software
I can't seem to determine what the best method is. The use of cookies is simpler
then using the session variables; however users can disables cookies; session
variables use more of the server resources.
Any other insight....
Cookies saved in RAM I s'pose you mean session level cookies - they expire when the user's session ends. By session variables I assume you mean using a session level cookie to store a unique ID then associating relevant data with it on the server side. If cookies are disabled then session variables won't work.
The only other way is to encode the session id in the url, but this can get messy and cause SE spidering problems.
3rd party software will have to use one (or more) of these three methods.
IMHO you should look at this from a user perspective: what does the user want? Many sites seem to use session level cookies for maintaining the cart, but this seems sub-optimal to me. I'd recommend using persistent cookies for your cart, so if a user returns, their cart's contents are still there.
Not sure if folks having cookies turned off is that much of a problem - anyone got any empirical evidence on this?