Search code examples
htmlhttpcachingmetacache-control

Scope of Cache-Control meta tag in HTML file


When declaring

<meta http-equiv="Cache-Control" content="no-store">

inside the head tag of an HTML file which scope does this statement have?

Does it mean that all other files referenced in this document (like JavaScript or CSS files) shouldn't be cached either?

Or does it just refer to the current HTML file?


Solution

  • The http-equiv attribute provides an HTTP header for the information/value of the content attribute.

    The http-equiv attribute can be used to simulate an HTTP response header.

    see HTML http-equiv Attribute

    As mentioned in another answer this only seems to affect the current page.