3

测试示例http://code.msdn.microsoft.com/windowsapps/Getting-started-with-310271df

我在WinJS.xhr打电话时遇到了一些荒谬的问题。如果您第一次运行它,下面的示例可以工作。但是,下次它会给出这个错误!

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."

现在,如果我删除调试文件夹,它对我来说又可以正常工作了。如果我安装它,情况也是如此。

4

1 回答 1

2

尝试这个:

return WinJS.xhr({ url: myUrl, headers: { "Cache-Control": "no-cache"} });
于 2014-02-04T14:31:06.857 回答