How to ensure that WinJS.xhr resends requests (HTML)
When you request Web resources by using WinJS.xhr, the response might be cached, which means that later requests will return the version of the resource that already exists on the client computer rather than resending the request. However, you can add an HTTP header that ensures that the request is sent again, even if it has already been cached.
- The example shown here uses the code from the XhrExample project that was created in Download a file with WinJS xhr.
This code shows how to set the If-Modified-Since HTTP header, which specifies that the client should resend the request to check for a more recent version of the resource.
- Other resources
- Connecting to web services
- How to download a file with WinJS xhr
- HTTP Response Headers
- XMLHttpRequest enhancements
- Integrating content and controls from web services sample
- Using a Blob to save and load content sample
- Web authentication sample
- XHR, handling navigation errors, and URL schemes sample