Ticker

6/recent/ticker-posts

Ad Code

Responsive Advertisement

html meta中的cache-control no-cache会导致js也不缓存吗?

react 单页应用,请求的 js 文件response header里有 ETag 和 Last-Modified,在没有重新部署更新的情况下,关闭页面重新打开后并没有使用缓存,没有看到304。

发现js文件的请求 header 中有 Cache-Control: no-cache,代码里只有index.html里有

<meta http-equiv="cache-control" content="no-cache" />

代码里 js 没有设置这种 header。

所以想请问<meta http-equiv="cache-control" content="no-cache" />是只使 index.html 不缓存还是打包后index.html 中的js、css文件也不缓存?

Enregistrer un commentaire

0 Commentaires