, , .
- , , . , cookie .
cookie , .
. , cookie . ( , ) - , . . . . . , .
. . cookie. , .
Edit: so I ran over my apache server and monitored RAM and processor activity. (No significant results). I also checked the time it took the server to set and cancel 1000 variables (containing a string of 30 characters) in sessions and in cookies. Carried out all tests a couple of times and took avg. result. Here are the results.
COOKIES
Set: 0.001863 seconds.
Unset: 0.004932 seconds.
SESSIONS:
Set: 0.000494 seconds. (very consistent results)
Unset: 0.000502 seconds. (Again very consistent)
Thus, sessions are much faster and more consistent. If you can use sessions. I would definitely go to the sessions.
source
share