Date: 10/25/99
- Next message: Teodor Cimpoesu: "[PHPLIB] hey, need some insights"
- Previous message: Chris Cochella: "[PHPLIB] Using PHPLIB(auth & session) for multiple user accounts"
- In reply to: Fabrizio Ermini: "[PHPLIB] Nope, you won't fool MSIE...."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, 25 Oct 1999, Fabrizio Ermini wrote:
>...It'll never believe that it REALLY needs to reload a document unless it's
>really necessary.
>
>I've used Phplib 7 + session.inc from current CVS tu build a rather complex
>site. Now I've realized that MSIE 4.0 is still happily caching pages, even if I
>opted for the default (not cached) sess object!!!
[...]
>
>I've even tried to put in the pages the good ol'fashioned
><META HTTP-EQUIV="Expires" CONTENT="Mon, 06 Jan 1990 00:00:01 GMT">
>but to no avail.
>
>Besides going to bash some head in Redmond, there's some other way to tell to
>MSIE to definitely NOT cache pages, dammit????
I solved that pretty annoying problem by adding '?'. mktime()
timestamp at the end of each url.
Pretty clumpsy but it seems to work.
Plus, here's the script you can find on the net, maybe it
could help you:
function cacheable ($days='', $printlastmod='yes') {
// Normal use: cacheable();
// Should appear before any normal (non-HTTP-header)
// output.
// cacheable('no') will try it's very best to make
// the page non-cacheable (be putting the
// Expires header in the path)
if ($days == 'no') { $days = -1; }
// Default caching time
if (($days=='') || ($days=='yes')) { $days = 1; }
settype($days, 'double');
setlocale('LC_ALL', 'en_US');
global $SERVER_PROTOCOL;
if ($days < 0) {
if ($SERVER_PROTOCOL == 'HTTP/1.1') {
header('Cache-Control: no-cache');
} else {
header('Pragma: no-cache');
}
header('Expires: ' .
strftime('%a, %d %b %Y %H:%M:%S GMT',
(time() - 86400)));
} else {
// The Last-Modified header may not always be
// relevant, but I believe that it makes the
// pages more cacheable. Default is to put
// it there.
if ($printlastmod == 'yes') {
header('Last-Modified: ' .
strftime('%a, %d %b %Y %H:%M:%S GMT',
getlastmod()));
}
if ($days > 0) {
header('Expires: ' .
strftime('%a, %d %b %Y %H:%M:%S GMT',
(time() + (86400 * $days))));
}
}
} // cacheable()
I don't know the author, unfortunatelly.
--
v
Davor Cengija
davor <email protected>
===================================
"Please allow 30 days for delivery"
-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.
- Next message: Teodor Cimpoesu: "[PHPLIB] hey, need some insights"
- Previous message: Chris Cochella: "[PHPLIB] Using PHPLIB(auth & session) for multiple user accounts"
- In reply to: Fabrizio Ermini: "[PHPLIB] Nope, you won't fool MSIE...."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

