开发者

syntax for Header set Expires

Default syntax for Header set Expires is:

Header set Expires "Wed, 21 May 2010 20:00:00 GMT"

and default syntax for ExpiresDefault is:

ExpiresDefault A2592000
OR
ExpiresByType image/gif A60

I want to use such a syntax for Header set Expires, that is I want to pass an expires ti开发者_如何学Cme in seconds after access. How can I do this ?


It can't be done directly, because RFC 2616 section 14.21 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21) says:

"The format is an absolute date and time as defined by HTTP-date in section 3.3.1..."

However, if you are able to set the HTTP header programmatically during delivery of your file, you can calculate a future date based on the current server time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜