Why Chrome doesn't update Typescript source files on change?

I'm working on a TypeScript (0.9.1) project using Visual Studio 2012 with the latest Web Essentials as the IDE, and i debug using Chrome Developer tools.

Recently, and most probably after Chrome update (cur. Version 29.0.1547.66 m), typeScript files don't get updated after i edit them, and on the other hand the corresponding compiled js files are updated, but it seems that somehow the functionality still depends on the non-updated version of the sources.

Solutions tried and failed :

  • Rebuild the full solution.
  • Hard refreshing (Shift + F5) the local host site on chrome
  • Deleting Source map files and generate them again.
  • After some trials it looks like even a request to download the ts source files yields the non-updated version ( http://localhost:1198/xxx.ts eg)

    It seems that the problem gets partially fixed after full restart (windows 8 if it matters), the source files are updated in chrome, but once i change it again, the same problem appears.

    Another solution was using incognito, as it seems that it's a caching problem.

    My question :

    Is caching typeScript files that way is caused by a problem in the configurations of the project (even it was working before), or this is a bug in the new version of Chrome ?


    如果您从IIS提供服务,我们已在我们的web.config文件中手动禁用缓存:

    <system.webServer>
    
        <httpProtocol>
    
          <!--TODO: Remove this block for production (//TODO: Remove this block for production) -->
          <customHeaders>
            <!--DISABLE CACHE-->
            <add name="Cache-Control" value="no-cache, no-store, must-revalidate" />
            <add name="Pragma" value="no-cache" />
            <add name="Expires" value="0" />
          </customHeaders>
    
        </httpProtocol>
    </system.webServer>     
    

    I solved this by removing the cached files manually. This can be done through Chrome's settings:

  • Click on Customize and control Google Chrome - the burger menu icon in the top right corner of the browser window.
  • Select Settings near the bottom of the menu.
  • Scroll down and click on the Show advanced settings... link.
  • Click on the Clear browing data... button.
  • Check Cached images and files . The other checkboxes can be left unchecked.
  • Click on the Clear browing data button.
  • The 'Disable cache' checkbox in the network tab didn't work for me, nor did a Ctrl+F5.


    To I'm experiencing same problem. I solved this problem with chreome debug tools disable cache checked.

    My second problem, i wrote a lot of class into a same file. i splice every class to seperate file.

    在这里输入图像描述

    链接地址: http://www.djcxy.com/p/66984.html

    上一篇: Google Chrome中的源代码映射会推送到Error.stack

    下一篇: 为什么Chrome在更改时不更新Typescript源文件?