1

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\":\"myemail@myemail.com\",\"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

mche
  • 546
  • 8
  • 16
  • 1
    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. Let us know about your testing results. – Deepak-MSFT Jan 01 '20 at 05:15
  • @Deepak-MSFT - is there a best way to "reset" the IE browser? Does that involve an uninstall/reinstall or simply the "Reset IE Settings" in Internet Options > Advanced? – mche Jan 02 '20 at 00:07
  • You keep alluding to the "request being saved as a GET", but this doesn't make much sense. Surely the request is not cached; the _content_ / resource is. There is no concept of GET vs POST there. What's strange though is that you should never get a cached result for a POST request; that's ridiculous (and an HTTP spec violation). What are the headers of the response? – Lightness Races in Orbit Jan 02 '20 at 00:18
  • https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.5 – Lightness Races in Orbit Jan 02 '20 at 00:23
  • And clearing the cache is not the solution, but a hack; properly identifying non-cacheable resources is the solution. – Lightness Races in Orbit Jan 02 '20 at 00:24
  • No need to uninstall IE. Just go to Internet options-> Advanced -> Reset IE. did you get similar results on another machine with IE? – Deepak-MSFT Jan 02 '20 at 01:31
  • @Deepak-MSFT - I haven't tested on another windows machine but resetting appears to have gotten things to work. Thanks for your help! – mche Jan 02 '20 at 18:27
  • You can mark the helpful suggestion as an accepted answer may help other community members in future in similar kinds of issue. Thanks for your understanding. – Deepak-MSFT Jan 03 '20 at 01:50

1 Answers1

1

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.

Deepak-MSFT
  • 8,111
  • 1
  • 6
  • 14