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 :
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:
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