Chrome Developer Tools caches old version of JavaScript files

后端 未结 5 2053
执念已碎
执念已碎 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:47

    Chrome DevTools works fine for me. When I load it for a page it remembers beyond the lifespan of the chrome process what sources I have open; although it gets the order wrong. I see two differences in our devtools prefs: disable cache and enable maps. So I would advise:

    1) uncheck disable cache (while DevTools is open), 2) (if 1 didn't work) press the "Restore defaults and reload" button.

    0 讨论(0)
  • 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).

    0 讨论(0)
  • 2021-02-19 08:52

    Google appears to have fixed this issue. It's stopped occurring for me.

    0 讨论(0)
  • 2021-02-19 08:53

    The issue persists in 78.0.3904.97. To fix it run settings > advanced > reset.

    0 讨论(0)
  • 2021-02-19 09:01

    Some code editors such as rubymine cache js files.

    To solve for rubymine: File > Invalidate Cache/Restart

    0 讨论(0)
提交回复
热议问题