For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > April 2004 > Re: [PHP-DB] Re: Using $_SESSION array for large number of variables.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] Re: Using $_SESSION array for large number of variables.
Kelly Hallman

2004-04-25, 8:31 pm

Apr 25 at 7:48pm, Jimmy Brock wrote:
> I would recommend cookies, not session.
>
> Cookies are stored on the users machine, whereas session data is stored on
> the server. If you have a power failure or have to reboot the server session
> data will be lost -- since session data is stored in memory.


First, the default session handler stores data on disk, not in memory.
Not sure if restarting the webserver trashes them or not.

Cookies would not suffice for this much data. The size of each cookie and
the number of cookies allowed per site is limited. Not sure on the actual
limitations in modern browsers, but you probably shouldn't store more than
20 cookies, and they probably should not exceed 1024 bytes per cookie.
Furthermore, all the cookie data is transmitted from the client on each
hit, so there are practical limitations with bandwidth as well.

--
Kelly Hallman
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com