Date: 03/08/01
- Next message: Olivier DEMAH: "[phplib] templace.inc"
- Previous message: Peter Bowyer: "RE: [phplib] Cross DB SQL"
- In reply to: Richard Archer: "Re: [phplib] PhpLib / MSIE"
- Next in thread: Richard Archer: "Re: [phplib] PhpLib / MSIE"
- Reply: Richard Archer: "Re: [phplib] PhpLib / MSIE"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
session.inc in PHPlib 7.2c has several bugs concerning caching. I've
attached a patch showing how I've modified that file.
My tests show that, for some versions of PHP3 at least, calling the
header() function more than once for the same header name results in
sending only the last such header value. So I've changed session.inc
to send the Cache-Control header only once.
On Thu, Mar 08, 2001 at 10:36:55PM +1100, Richard Archer wrote:
> At 9:46 AM -0800 8/3/01, Ciprian Furtuna wrote:
>
> >It seems that there's a BIG problem when the browser is MSIE: after i've
> >start using phplib, MSIE is caching pages like hell !!
>
> In my experience it is absolutely impossible to prevent IE from
> caching pages for at least 60 seconds. Even if all these headers are
> set, IE will still display from the cache:
-- Fred Yankowski fred <email protected> tel: +1.630.879.1312 Principal Consultant www.OntoSys.com fax: +1.630.879.1370 OntoSys, Inc 38W242 Deerpath Rd, Batavia, IL 60510, USA-- Index: session.inc =================================================================== RCS file: /usr/local/cvsroot/imported/phplib/php/session.inc,v retrieving revision 1.1.1.3 retrieving revision 1.8 diff -u -r1.1.1.3 -r1.8 --- session.inc 2000/11/13 16:08:19 1.1.1.3 +++ session.inc 2000/11/16 18:43:10 1.8 @@ -259,7 +259,7 @@ $str .= "\$$prefix = array(); "; while ( "array" == $l ) { ## Structural recursion - $this->serialize($prefix."['".ereg_replace("([\\'])", "\\\\1", $k)."']", &$str); + $this->serialize($prefix."['".ereg_replace("([\\\\'])", "\\\\1", $k)."']", &$str); eval("\$l = gettype(list(\$k)=each(\$$prefix));"); } @@ -430,24 +430,23 @@ $mod_gmt = gmdate("D, d M Y H:i:s", getlastmod()) . " GMT"; header("Expires: " . $exp_gmt); header("Last-Modified: " . $mod_gmt); - header("Cache-Control: public"); - header("Cache-Control: max-age=" . $this->allowcache_expire * 60); + header("Cache-Control: public" + . ", max-age=" . $this->allowcache_expire * 60); break; case "private": $mod_gmt = gmdate("D, d M Y H:i:s", getlastmod()) . " GMT"; header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . $mod_gmt); - header("Cache-Control: private"); - header("Cache-Control: max-age=" . $this->allowcache_expire * 60); - header("Cache-Control: pre-check=" . $this->allowcache_expire * 60); + header("Cache-Control: private" + . ", max-age=" . $this->allowcache_expire * 60 + . ", pre-check=" . $this->allowcache_expire * 60); break; default: header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - header("Cache-Control: no-cache"); - header("Cache-Control: post-check=0, pre-check=0"); + header("Cache-Control: no-cache, post-check=0, pre-check=0"); header("Pragma: no-cache"); break; }
--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>
- Next message: Olivier DEMAH: "[phplib] templace.inc"
- Previous message: Peter Bowyer: "RE: [phplib] Cross DB SQL"
- In reply to: Richard Archer: "Re: [phplib] PhpLib / MSIE"
- Next in thread: Richard Archer: "Re: [phplib] PhpLib / MSIE"
- Reply: Richard Archer: "Re: [phplib] PhpLib / MSIE"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

