Browser not caching static file

297 Views Asked by At

I am using Apache server with mod_expires enabled. I have setup headers so that static files expire a week later. File is request via jQuery.get() method, cache set to true.

However, when I refresh the page on browser (Firefox), it always requests the file again. Caching and header field values seem to have no effect.

Below is a screenshot from Firefox developer tools.Request and response headers

1

There are 1 best solutions below

0
Arcin B On

How did you come up with the If-None-Match value? I don't see an ETag header with that value. Server will always send you a new one.

Another thing note is browser reload behaviour. By asking a refresh you may be asking for an end to end reload which bypasses all the caches, afaik.