添加过期头无mod_expires? [英] Add expires header without mod_expires?
本文介绍了添加过期头无mod_expires?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道,我可以添加使用mod_expires Expires头。但是,我能做些什么,如果Apache服务器没有安装mod_expires,我不希望借道脚本语言如PHP?
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?
推荐答案
您可以使用 mod_header 手动设置首标字段:
You could use mod_header to set the header field manually:
Header set Expires "..."
但由于的过期的需要一个< A HREF =http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1>绝对时间,使用的 的Cache-Control 的的的最大年龄的参数相对于访问时间时间:
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
这篇关于添加过期头无mod_expires?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文