Re: sessions with PHP4.0
| From: | Matthew Leverton | Date: | Fri, 09 Jun 2000 21:58:54 +0000 |
| Subject: | Re: sessions with PHP4.0 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-1464@lists.php.net to get a copy of this message | ||
session.cache_limiter = { nocache || private || public }
nocache:
whenever you are using sessions, headers are sent that
tell proxies and browser not to cache the page. this has
good and bad effects. the good is you know that the user
will never get an old page. the bad is that if the user
hits 'Back' on his browser, he will get a blank page asking
him to refresh. (exact message depends on the browser.) I
prefer not to use this setting, as I primarily deal with
(dumb) internet users.
private:
the browser caches the page, but proxies don't. this
is the setting that I use. this means that when the user
hits back, he will get the old page, but all the information
is left in the forms, etc. the only bad thing that I've
run across with this is that links and onclick javascript
redirects usually pull old pages from the cache. what I
do to avoid this is use "?_nocache=<?=random(1000,9999)?>"
on every link that I want to make sure gets the latest
page. both IE and Netscape will reload the page since it
contains a "anti-cache" random number.
public:
same things as private, except that proxies, etc can
cache the page.
by default the INI is set to "nocache".
the "cache_expire" is how many (I think) minutes that
the page is instructed to be cached for.
--
Matthew Leverton - matthew@aeroinc.net -
http://www.allegro.cc
-----Original Message-----
From: Richard Lynch <richard@zend.com>
To: php-general@lists.php.net <php-general@lists.php.net>
Date: Friday, June 09, 2000 4:49 PM
Subject: Re: [PHP-GENERAL] sessions with PHP4.0
>In article <960458845.326026@ambre>, olivier.jaillet@cegetel.fr ("Olivier
>Jaillet") wrote:
>
>> Could someone explain the use of session.cache_limiter and
>> session.cache_expire params of the php.ini configuration file?
>
>The latter almost for sure allows you to expire values being returned from
>PHP so that they are never "too old".
>
>The first probably lets you limit the number of values to be stored for
>any given userid or something...
>--
>Richard Lynch | If this was worth $$$ to you, buy a CD
>US Customer Support Director | from one of the artists listed here:
>Zend Technologies USA | http://www.L-I-E.com/artists.htm
>http://www.zend.com | (this has nothing to do with
>Zend, duh!)
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
>For additional commands, e-mail: php-general-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
>