Chrome Developer Tools caches old version of JavaScript files

后端 未结 5 2055
执念已碎
执念已碎 2021-02-19 08:19

I\'m experiencing a strange intermittent issue with Chrome Developer tools hanging on to old versions of JavaScript files. I\'ll be developing some JS app, things humming along

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-19 08:49

    As suggested here https://groups.google.com/d/msg/google-chrome-developer-tools/2rolf--fJ3M/UTJQaZN3K28J, for development environment I added these headers when serving a sourcemap:

    Cache-Control: no-cache, no-store, must-revalidate
    Pragma: no-cache
    Expires: 0
    

    and it seems to do the job (at least for now).

提交回复
热议问题