How to stop caching my HTTP request & response in ionic 3
After lots of R&D and web search regarding the above issue I found a solution to clean my request cache as above all header not work to clean cache.
In http Advanced plugin there is one method to clear my cookies.
clearCookies()
Clear all cookies.
By using above method in my class constructor to clear cookies before calling any API.
So what it will do clear all my cookies and my issue related to old cookies will be solved in this way.
constructor(
public storage: Storage,
public httpPlugin: HTTP,
private platform: Platform
) {
// enable SSL pinning
httpPlugin.setSSLCertMode("pinned");
//Clear old cookies
httpPlugin.clearCookies();
}
The above code solves my issue.
Thanks all for your quick guidance and suggestions.
comment on this if this is not the right way to clear my old request data.