Cache-Control header 是否控制页面内 CSS 和 JS 文件的缓存

Does Cache-Control header control the cache for CSS and JS files within the page

Cache-Control header 在页面中设置为 no-cache, no-store, must-revalidate。这是否适用于页面中包含的 CSS 和 JS 文件。我们希望每次访问页面时都下载 CSS 和 JS 文件。

Does this apply to the CSS and JS files included in the page

没有。 Cache-Control header 仅适用于返回的特定资源,不适用于任何引用的资源。如果您想控制缓存方式,请在您提供的 .js.css 文件上设置相同的 headers。