开发者

What's the right way to control cache with Apache?

So I've got a small site here where my users come to and use it daily, and once in a while they just want me to make some small changes to a file that will only be about (at most) 512bytes of text.

Now, when they use IE8 or IE9, their browser kept an old cache, and won't update开发者_高级运维 without being a serious pain in the backside making them have to hammer on f5 or something else to clear the cache.

Obviously this is my web server's fault in the fact I'm not doing something properly with my cache control headers, but I'm not familiar enough with the headers to know what it is.

Here's what I'm sending (at 20 May 2011 15:12:26 GMT):

Response Headers
Connection:Keep-Alive
Date:Fri, 20 May 2011 19:12:26 GMT
ETag:"8001e-310f-4a3b8f421ac00"
Keep-Alive:timeout=15, max=100
Server:Apache/2.2.12 (Ubuntu)
Vary:Accept-Encoding

What do I need to send to fix my cache control so the cache updates for my IE users (only when the file has actually been modified)? Works fine in Chrome.


try the Last-Modified and Expires headers. If nothing else, the Expires header would be taken as a strong hint that a fresh copy should be fetched after that date/time is passed.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜