Get Google Chrome
Vimium · 在 Chrome 里使用 vim 快捷键
coderstory
V2EX  ›  Chrome

怎么解决 chrome js 调试 的缓存问题

  •  
  •   coderstory · Jan 17, 2017 · 4028 views
    This topic created in 3483 days ago, the information mentioned may be changed or developed.

    首先说明下,我说的缓存不是本地 js 缓存导致服务端修改在浏览器上不生效的问题。

    而是 chrome 的 js 引擎内部缓存。

    该 JS 在 F12 控制台中显示的文件名会以 VMxxx 开头 xxxx 表示一个随机数字

    JS 文本背景色会变成淡黄色(淡黄色应该是 vm 缓存模式 白色是标准模式 红色表示 已在客户端修改的缓存)

    一般的讲,直接 F5 就好了。

    但我现在写的代码都是 iframe 里面的 刷新单个 iframe 无法刷新这个缓存。

    现在 每次修改都要刷新整个网页才能继续调试

    求解这个要怎么解决

    3 replies    2017-09-19 08:58:11 +08:00
    coderstory
        1
    coderstory  
    OP
       Jan 17, 2017
    js 的 url 显示为类似 debugger:///VM6596 ChooseNoticesUser.do 这样的地址
    mlkr
        2
    mlkr  
       Jan 17, 2017
    ahill
        3
    ahill  
       Sep 19, 2017
    如果 iframe 之间没有交互的话
    在新标签页打开链接( iframe
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2822 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 07:13 · PVG 15:13 · LAX 00:13 · JFK 03:13
    ♥ Do have faith in what you're doing.