[英]mod_headers set cookie expire date
Currently, I'm using this code in my Apache config to save a cookie on an image request:目前,我在我的 Apache 配置中使用此代码在图像请求中保存 cookie:
<FilesMatch "^image\.jpg$">
Header set Set-Cookie: "cookiename=value"
</FilesMatch>
How can I set the cookie expiry date?如何设置 cookie 的到期日期? I tried googling it but came up with nothing..
我试着用谷歌搜索它,但什么也没想到..
Thanks,谢谢,
should look into http header than apache directive.应该查看 http header 而不是 apache 指令。 Take a look here.
看看这里。 http://en.wikipedia.org/wiki/HTTP_cookie#Expires_and_Max-Age
http://en.wikipedia.org/wiki/HTTP_cookie#Expires_and_Max-Age
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.