Mansoor
Mansoor

Reputation: 11

Angular 2 - http post works only when developer tools is opened in IE 11

I am unable to figure out what could e the cause..I do not have any console loggin either.

Any help or advice is much appreciated.

Upvotes: 0

Views: 509

Answers (2)

Mansoor
Mansoor

Reputation: 11

The problem to my answer was to deal with caching .

Thanks to Arnaud Tournier for making me look in the right direction.

headers.append('Content-Type', 'application/json; charset=utf-8');
  headers.append("Cache-Control", "no-cache");
  headers.append("Cache-Control", "no-store");
  headers.append("If-Modified-Since", "Mon, 26 Jul 1997 05:00:00 GMT");


  [1]: http://Arnaud%20Tournier

Upvotes: 1

Arnaud Tournier
Arnaud Tournier

Reputation: 1004

I think the problem comes from ie caching http responses. Your server should add the appropriate header in the http response to prevent the browser from doing that.

What is your application server? There may be configuration options depending on it.

Upvotes: 0

Related Questions