Seb*_*ebi 7 apache .htaccess mod-expires
我知道我可以使用mod_expires添加expires头.但是,如果Apache服务器没有安装mod_expires并且我不想通过像PHP这样的脚本语言来访问文件,我该怎么办?
您可以使用mod_header手动设置标题字段:
Header set Expires "..."
Run Code Online (Sandbox Code Playgroud)
但由于Expires需要一个绝对时间,因此使用Cache-Control的max-age参数来计算相对于访问时间的时间:
Header merge Cache-Control max-age=3600
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7008 次 |
| 最近记录: |