Date: 01/19/01
- Next message: Benjamin Munoz: "RE: [phplib] Is PEAR ready?"
- Previous message: Matt Friedman: "[phplib] Is PEAR ready?"
- In reply to: Chris Johnson: "RE: [phplib] IE problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 1/19/01 1:44 PM, "Chris Johnson" <chris <email protected>> wrote:
[snip good explanation and example]
>
> I do this using PHPLIB 7.0. The more recent versions of PHPLIB I
> believe include similar code and should work right out of the box.
>
>
> ..chris
>
Yes, 7.2b had some fixes for ie4, 7.2c has fixes for ie5
>From session.inc:
function put_headers() {
# Allowing a limited amount of caching, as suggested by
# Padraic Renaghan on phplib <email protected>
#
# Note that in HTTP/1.1 the Cache-Control headers override the Expires
# headers and HTTP/1.0 ignores headers it does not recognize (e.g,
# Cache-Control). Mulitple Cache-Control directives are split into
# mulitple headers to better support MSIE 4.x.
#
# Added pre- and post-check for MSIE 5.x as suggested by R.C.Winters,
# see
http://msdn.microsoft.com/workshop/author/perf/perftips.asp#Use%20Cache-Cont
rol%20Extensions
# for details
switch ($this->allowcache) {
case "passive":
$mod_gmt = gmdate("D, d M Y H:i:s", getlastmod()) . " GMT";
header("Last-Modified: " . $mod_gmt);
# possibly ie5 needs the pre-check line. This needs testing.
header("Cache-Control: post-check=0, pre-check=0");
break;
case "public":
$exp_gmt = gmdate("D, d M Y H:i:s", time() +
$this->allowcache_expire * 60) . " GMT";
$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);
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);
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("Pragma: no-cache");
break;
........
nathan hruby
Webmaster: UGA Department of Drama and Theatre
Project Maintainer: phpSlash, Carousel
nhruby <email protected>
........
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: Benjamin Munoz: "RE: [phplib] Is PEAR ready?"
- Previous message: Matt Friedman: "[phplib] Is PEAR ready?"
- In reply to: Chris Johnson: "RE: [phplib] IE problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

