0

I am working on a windows 8 application in javascript. The application fetches a xml periodically from the server, parse the data and update the data in application. When the application is updated, the application is not displaying the latest data instead the previously fetched result is displayed. This may be due to caching of xml data but am not sure about the issue.

The problem is not with fetching of data. The query is the latest data is not fetched from the server on update.Instead previously fetched data is displayed. The file name fetched from the server is "default.xml". How to make sure that the application fetched the xml from the server thereby no cache is stored and referenced.

I am using Javascript Grid application. The code for xml download is as follows:

WinJS.xhr({ url: xmlurlFetch }).done(
    function onComplete(result) {
        var xmlDoc = result.responseText; // Response Text from XML
    },
    function onError(err) {
        document.getElementById("dispaly_text").innerHTML = "Error" + err.responseText;
    });
4

1 回答 1

0

我从 http://msdn.microsoft.com/en-us/library/windows/apps/hh868281.aspx找到了问题的解决方案

将标头参数添加到 URL 就可以了。

于 2013-08-22T13:55:09.430 回答