opensource-developer
opensource-developer

Reputation: 3068

mozilla firefox ignoring the cache-control header

I am loading a few thumbnail images in my application which are stored on google cloud, I have made the thumbnail objects public and set cache-control: public, max-age:2628000, this seems to be working on chrome where i see the images are getting loaded from cache but on mozilla firefox this is not working, whenever i reload the page, I always see the images are been request from the server. I have also checked that I do not have disable cache checked in developer tools here is a screenshot

enter image description here

Everytime i see bytes transferred and the images are not loading from cache.

Any help in this would be really appreciated. Thanks.

Upvotes: 5

Views: 4980

Answers (1)

opensource-developer
opensource-developer

Reputation: 3068

for anyone who might stumble on this post, I figured out that mozilla was indeed caching the images and displaying it from the cache.

if you open a page and then copy / paste the same url in the same or new tab, you will observe that mozilla displays the cached version of the images, when you reload a page, the images will be requested from the server.

I found out the answer to my post here Is Chrome ignoring Cache-Control: max-age?, please read this as its explained in much more detail here.

Upvotes: 4

Related Questions