What is the substantial difference between the
session variables and the cookie variables
(except that the first are memorized in the server
and the second in the client machine)??
Is better use sessione variables or cookies variables?
Like you mentioned, session variables are stored in the server ram, so if the server gets rebooted or the cf service restarted, they are lost. If your server does not have a lot of RAM, and you get a lot of use, then you may see some problems there.
If you have a lot of traffic to your site, session variables do not scale too well if you need to use multiple servers. For a lot, this is not an issue. Clien variables work a lot better in this case.
Session variables can be controlled better -- they have a specific time out period and you can put complex variables (e.g Arrays and structures) into session scope that you cannot do with client vars. However, you need to use cflock to read and write to session variables.
They each have their use and one is better suited than the other depending on the circumstances. I hope this helps.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.