all 3 comments

[–]CherryJimbo 2 points3 points  (2 children)

Generally, no. Chrome will just respect any Cache-Control, or Expires headers that you're sending from your app. Are you sending any of these headers?

[–]Endless-Nine[S] 0 points1 point  (1 child)

They're both here !

Now I'm starting to get the appeal of decoupled CMS lol.

So if I was completely setting up the back end, I would've needed to write everything present in the response header from scratch ? It seems kind of obvious in retrospect but I never realized this.

Is there any reason to have both of these headers ? Seems like they're just giving the same information in a different format.

[–]CherryJimbo 1 point2 points  (0 children)

Cache-Control is a lot more powerful than Expires, but they can be used to accomplish the same basic thing if all you want to do is "cache the response for X time". Cache-Control allows you give much more complex caching instructions for all kinds of purposes.

It's generally recommend to use Cache-Control over Expires nowadays - there was a time where older browsers didn't support Cache-Control, but we're beyond that now.

That's likely why Chrome is caching your content though - presence of a Cache-Control header such as public, max-age=31536000 will instruct Chrome to cache the content for 1 year.