Re: Cache headers?

by "Srinivasan Ramakrishnan" <srinivar(at)md3.vsnl.net.in>

 Date:  Sat, 10 Feb 2001 11:04:20 +0530
 To:  "Lauri Vain" <optima(at)hot.ee>,
<hwg-languages(at)hwg.org>
 References:  lauri
  todo: View Thread, Original
Hi,

Since you have used header(), I assume this is PHP, here's what I do:

<?php
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");    // Date in the past
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always
modified
header ("Cache-Control: no-cache, must-revalidate");  // HTTP/1.1
header ("Pragma: no-cache");                          // HTTP/1.0
?>

----- Original Message -----
From: "Lauri Vain" <optima(at)hot.ee>
To: <hwg-languages(at)hwg.org>
Sent: Friday, February 09, 2001 8:21 PM
Subject: Cache headers?


: Hello everybody,
:
: I want the browser to cache dynamic images served directly from the
database. To
: do this, I need to send headers but I don't know the exact value that has
to be
: entered for HTTP PRAGMA and HTTP CACHE-CONTROL (are there others which
control
: caching?). The image has to be cached forever (or as long as the browser
permits
: it to be cached). Do I also have to send the HTTP EXPIRE?
:
: Are the following ones right? Can anybody add some? Anyway, can anybody
please
: tell me the correct values to accomplish this task?
:
: header("Cache-Control: cache");
: header("Pragma: cache");
:
:
: Thanks very much!
:
: Yours,
: Lauri
:
:

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA