XMLHTTPRequest(CORS) doesn't use local cache

Issue #105342

Details

Created
Apr 27, 2014
Privacy
This issue is public.
Found in build #
0.0011
Reports
Reported by 11 people

Sign in to watch or report this issue.

Steps to reproduce

URL =

URL:

Repro Steps:

The original issue description and reproducing steps locate in: http://social.msdn.microsoft.com/Forums/en-US/98bcdf4c-4a55-4243-a2ea-2064ed9d8568/xmlhttprequestcors-doesnt-use-local-cache?forum=iewebdevelopment

1, In IE 10 (and IE 11), use XMLHTTPRequest(CORS) to request a server file. The code is as follows:
var xhr=new XMLHttpRequest();
with (xhr) {
onload=function(){
// …
}
onerror=function(){
// …
}
open("GET","http://anotherdomain.com/ajax.asp",true);
withCredentials=true;
send(null);

2, The server file ajax.asp returns several HTTP headers and normal content:
Access-Control-Allow-Origin: http://mydomain.com
Access-Control-Allow-Credentials: true
Cache-Control: max-age=3600

3, In local internet temporary files folder, I can see the http://anotherdomain.com/ajax.asp cache file expire time is properly set to be an hour later.

4, Repeat running the code in step 1, I found every time, IE 10/11 still sent request to server anotherdomain.com to request the file ajax.asp. It seems IE totally ignores ajax.asp returns "Cache-Control: max-age=3600".

The behaviour is different with Chrome and Firefox. After the two browser receive the response ajax.asp from anotherdomain.com first time, they will not send request for subsequent same XMLHTTPRequest request. And I found the requests to ajax.asp contains a header "Cache-Control: no-cache", Chrome and Firefox don’t contain the header when they request ajax.asp by XMLHTTPRequest.

Expected Results:

The behaviour is different with Chrome and Firefox. After the two browser receive the response from the server first time, they will not send any request for subsequent same XMLHTTPRequest requests. And I found the requests launched by IE XMLHTTPRequest contains a header "Cache-Control: no-cache", Chrome and Firefox don’t contain the header when they send requests by XMLHTTPRequest.

Actual Results:

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “David W.”

      Changed Status to “Confirmed”

      Changed Assigned To from “David W.” to “IPBS P.”

      Changed Status from “Confirmed”

      Changed Assigned To from “IPBS P.” to “Venkat K.”

    • Microsoft Edge Team

      Changed Steps to Reproduce

    • I’m having the same issues with MS Edge 25.10586.0.0 EdgeHTML 13.10586.

    • This bug is around for more than 2 years. Any work around for this issue? This repro for us on Both IE 11 and Edge.

    • Bump! Would love to get an update here too - this is negatively affecting client-side viewer performance for our product.

    • Some easy repro steps for IE11:

    • I’m facing the same problem. Any workaround?

      This is three years old issue.

    You need to sign in to your Microsoft account to add a comment.

    Sign in