angularjs code changes do not show up after browser refresh

后端 未结 17 1763
北海茫月
北海茫月 2020-12-13 09:35

Any time, I make code changes in .hmtl file or the .js file, the browser still renders the old code and my new code changes don\'t show up in the browser result.

Fo

17条回答
  •  余生分开走
    2020-12-13 10:27

    For me, none of the previous answers worked. I was using Chrome, and the only way I was able to view the update was by opening an incognito window. My regular browser window, for some reason, just will not get the latest assets.

    I have tried clearing my cache, disabling cache on devtools, and hard refresh, to no avail. The only way I was able to fix it was by clearing the DNS cache. Here's a link with more details:

    How to Clear the DNS Cache on Computers and Web Browsers


    Using command line, here's how you go about doing it:

    Windows 7 & Earlier

    ipconfig /flushdns
    

    Windows 8

    ipconfig /flushdns
    

    OSX (Yosemite, El Capitain, and Sierra)

    sudo dscacheutil -flushcache
    sudo killall -HUP mDNSResponder
    

提交回复
热议问题