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
e.g)
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 ?
Hold down Ctrl and click the Reload button. Or, Hold down Ctrl and press F5. just open the Chrome Dev Tools by pressing F12. Once the chrome dev tools are open, just right click on the refresh button and a menu will drop down.
TypeScript cannot be run or understood in any browser. So, TypeScript is compiled to JavaScript (which browsers can understand).
To debug TypeScript, we need to create an index. html and inside that we need to link our findbug. js file, this is because we will use the Chrome DevTools and we will be able to debug our TypeScript file. After that, we need to install live-server or use the live-server extension for VS Code.
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.
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.
If you are serving from IIS, We have manually disabled cache in our web.config
file :
<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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With