IE 11 caching Axios Http calls

Sami C.
1 min readOct 2, 2019

--

Today I was testing my application in IE11…A Dinosaur I rather not deal with, but hey, here I am writing a blogpost about it.

IE 11 for some reason decided to cache my http calls. Therefor not returning the latest result.

A simply fix for this issue was to add a Pragma header:

Axios.defaults.headers[‘Pragma’] = ‘no-cache’;

It is basically the same as Cache-Control: no-cache.

This will no longer cache the requests on IE 11.

Enjoy!

--

--

Sami C.
Sami C.

Written by Sami C.

Freelance Software Engineer

No responses yet