Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add expires header without mod_expires?

I know that I can add expires header using mod_expires. However, what can I do if the Apache server doesn't have mod_expires installed and I don't want to route the access to the files through a scripting language like PHP?

like image 861
Sebi Avatar asked Sep 02 '10 10:09

Sebi


1 Answers

You could use mod_header to set the header field manually:

Header set Expires "..."

But since Expires requires an absolute time, use Cache-Control’s max-age parameter for times relative to the access time:

Header merge Cache-Control max-age=3600
like image 145
Gumbo Avatar answered Nov 15 '22 09:11

Gumbo