Hello Perrin,

Thanks for the tip. I am just surprised that setting dynamic pages to expire immdiately is not a common line in the code for developers. Don't we want them (pages) to expire immediately, instead of worrying whether the browser will cache the page? Or am I missing something here?


Perrin Harkins wrote:

On Thu, 2005-06-23 at 12:16 +0800, Foo Ji-Haw wrote:
$r->headers_out->add('Expires'=>CGI::Util::expires('now','http'));

Notice that I have to 'use CGI::Util' to set this to work. CGI::Util does not expose the function, but it seems to work quite well.

I am sure there is a better way to do this via perhaps Apache::RequestRec. But I can't seem to find it. Any pointers for me?

Sounds like you want Apache2::Util::ht_time:
http://perl.apache.org/docs/2.0/api/Apache2/Util.html

- Perrin

Reply via email to