Welcome! Log In Create A New Profile

Advanced

Firefox cache images more than cache-control: max-age

August 23, 2012 09:50AM
Hello.

Some visitors of my site complain about their Firefox is pulling images
from cache, whereas it should not do that, because images on the site
are changing few times a day. In other words, .png images that are
static, always have same file name, but few times a day they get
overwriten with new ones. When visitor loads web page, fresh versions of
images must be displayed, but Firefox ofted pulls them from it's cache.
I don't have any report of other browsers than FF is doing that problem.
However, I don't found issue myself; browsing all the time with Firefox
on Linux at home, and also few Firefox on Windows on work and everything
is OK. This is why I cannot track issue very well.

In nginx configuration I allowed little bit of caching (6 minutes) so
when visitor loads page again in a short period of time they can be
cached versions, but not for a long time, say few hours! So I set:

location / {
root html;
index index.html index.htm;
autoindex on;
expires 6m;
}


Checking with Live HTTP Headers I'm getting these responses for images:

http://46.102.240.202/images/gfs/06z/pcs/pcs_18.png

GET /images/gfs/06z/pcs/pcs_18.png HTTP/1.1
Host: 46.102.240.202
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.4) Gecko/20100101
Firefox/10.0.4
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.7,hr;q=0.3
Accept-Encoding: gzip, deflate
Connection: keep-alive
Referer:
http://maps.meteoadriatic.net/gfs-karte-aktualne/eksperimentalni-pcs-index-brn.html

HTTP/1.1 200 OK
Server: meteoadriatic.net
Date: Thu, 23 Aug 2012 13:05:55 GMT
Content-Type: image/png
Content-Length: 31313
Last-Modified: Thu, 23 Aug 2012 09:34:29 GMT
Connection: keep-alive
Expires: Thu, 23 Aug 2012 13:11:55 GMT
Cache-Control: max-age=360
Accept-Ranges: bytes


So I think everything should be set to cache images for 360 seconds (6
minutes) and when image is loaded after that time pass, they have to be
pulled from server again, not from cache.

What can I do to help those users who has to refresh page manually every
time they want to see fresh images?

Thanks in advance,
Ivan

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Firefox cache images more than cache-control: max-age

coldplug August 23, 2012 09:50AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 184
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready