Search code examples
internet-explorerinternet-explorer-11browser-cache

Clearing request cache on IE11 - POST getting saved as a GET


This question is very similar to this post except specific to clearing the cache in the IE11 browser.

No matter how I clear my history/cache (clearing history, Network Tab > clear cache, Network tab > always refresh from server) when I submit a new request, I am seeing the response with this message Received (from cache) (This resource was loaded from the cache and it was not affected by network latency).

I should add that the route is supposed to be a POST request but it gets saved in the browser as a GET req. This is only happening in the IE11 browser. The req/res headers are missing.

On two separate occasions did it actually make the request over the network properly as a POST, but that was out of ~100 times I've tried this. I do not know why it worked for those two specific instances. But every subsequent request gets intercepted by the cache and returns a 200 GET with no headers. This always works fine in Chrome/Firefox (no caches, odd network responses).

So this is really two separate problems. 1. A POST is getting saved as a GET for IE11 and 2. clearing the request cache for IE11 isn't working.

I'd like to avoid adding headers to solve this issue, I'd mainly like to find a way to clear the IE11 browser cache as it seems the initial POST request works, just any subsequent requests uses the saved cache (as a GET for some reason). That said, finding and fixing why the POST is getting cached as a GET would provide me a way forward as well.

enter image description here

Using whatwg-fetch to polyfill IE and using babel-polyfill for Promises.

** Tried sending the request via dev console. Same results between the chrome/IE browsers (works in Chrome, following error in IE SCRIPT7002: XMLHttpRequest: Network Error 0x2ef3, Could not complete the operation due to error 00002ef3.)

Here is the request I'm making:

var options = {
    "body": "{\"email\":\"[email protected]\",\"pass\":\"mypassword\"}",
    "credentials": "include",
    "headers": {
        "Content-Type": "application/json; charset=utf-8"
    },
    "method": "POST",
    "mode": "cors"
}


fetch("https://locally-running-host:9876/some-route/logmein", options).then(function(response) { return response.json() }).then(function(myJson) { console.log(myJson)})

Follow up - resolved - this was a cert issue mainly caused by my workstation's lack of permissions and my work's restrictive network. Both resolved through just jamming permissions and resetting things per @deepak-msft


Solution

  • Did you try to check this issue with any other machine using IE 11? If not, you can check to verify whether this issue is with a specific machine or not.

    If it works properly on another machine with IE 11 then you can try to reset your IE browser. Check whether you are using the latest updates for the IE browser.

    To reset IE browser, you can go to Internet options-> Advanced -> Reset IE.