WinJS.xhr error while executing second time

3

Test sample http://code.msdn.microsoft.com/windowsapps/Getting-started-with-310271df

I am facing some absurd issue with WinJS.xhr call. Below sample if you run it works for the first time. However, next time onwards it gives this error!

Exception is about to be caught by JavaScript library 
code at line 2351, column 21 in ms-appx://microsoft.winjs.1.0/js/base.js

0x800c0008 - JavaScript runtime error: The download of the specified 
resource has failed.

If there is a handler for this exception, the program may be safely continued."

Now if I delete the debug folder it just works fine again for me. This is the same case as well if I install it.

javascript
windows-store-apps
winjs
asked on Stack Overflow Oct 17, 2012 by Wriju Ghosh • edited Feb 20, 2013 by devhammer

1 Answer

2

Try this:

return WinJS.xhr({ url: myUrl, headers: { "Cache-Control": "no-cache"} });

User contributions licensed under CC BY-SA 3.0