Add expires header without mod_expires?

后端 未结 3 1012
情书的邮戳
情书的邮戳 2021-01-12 07:40

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

3条回答
  •  星月不相逢
    2021-01-12 08:27

    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
    

提交回复
热议问题