Zoya
Zoya

Reputation: 282

Expires header has values of last year date

I am seeing an old expiry date in headers. This is on a Firefox browser for Magento 2 site using nginx with FPC on. Please see below header. Is this something to be worried about?

enter image description here

Upvotes: 1

Views: 1498

Answers (1)

Barry Pollard
Barry Pollard

Reputation: 45950

Looks like it’s intending this asset not to be cached. Notice the cache-control sets max-age to 0 and must-revalidate and some other directives.

Expiries is only used by older clients that do not understand the cache-control header (which is basically every browser has for the last 10 years) but it doesn’t allow a “do not cache” value so a hack around that is to set an old date to indicate it’s already expired.

So the question for you is: do you want to cache this? If so then yes this is a problem, if not then it is working as intended.

There’s massive performance gains to caching, for when you use the asset again (on a different page, or by coming back to this page) but on the flip side it adds complications if you want to have a new version of the asset.

Upvotes: 4

Related Questions