Re: Re: Using $_SESSION array for large number of variables. Any recommendations?

From: Date: Mon, 26 Apr 2004 00:00:01 +0000
Subject: Re: Re: Using $_SESSION array for large number of variables. Any recommendations?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-34084@lists.php.net to get a copy of this message
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

« previous php.db (#34084) next »