Reputation: 51
I'm making an API Call using JavaScript but while making a call for second time, I'm getting that data from cache.
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="expires" content="-1" />
<meta http-equiv="Pragma" content="no-cache" />
I've included above meta Tags in Head Section of HTML.
and also while making an API call, I've intecepted the request with below headers.
{ "Cache-Control" : "no-cache" , Pragma: "no-cache", Expires: "-1" }
but still I'm getting that api data from cache for second time. This issue is only for the IE.
apart from below mentioned tags I've also tried with
<meta http-equiv="Cache-Control" content="no-store" />
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
But it couldn't help much.
Can anyone please suggest the solution.
Thanks,
Upvotes: 1
Views: 745
Reputation: 11
Disabling webpage caching in Internet Explorer 11
The StorageGRID Webscale Installer web page might appear to function incorrectly if you use webpage caching in Internet Explorer 11. You must disable caching if you want to use this browser to access the Installer web page.
Steps From the top right corner of Internet Explorer 11, click the Gear icon gear icon. From the menu, select Internet options. On the General tab, locate the Browsing history section, and click Settings. On the Temporary Internet Files tab, confirm that Every time I visit the webpage is selected. Website Data Settings > Temporary Internet Files > Every time I visit the webpage selected On the Caches and databases tab, confirm that Allow website caches and databases is not selected. Website Data Settings > Caches and databases > Allow website caches unselected Click OK.
Upvotes: 1