Angular 2 - http post仅在IE 11中打开开发人员工具时才有效

时间:2017-05-19 07:20:46

标签: internet-explorer-11 angular2-services

我无法弄清楚原因是什么......我也没有任何控制台登录。

非常感谢任何帮助或建议。

2 个答案:

答案 0 :(得分:1)

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

答案 1 :(得分:0)

我认为问题来自于缓存http响应。 您的服务器应在http响应中添加适当的标头,以防止浏览器这样做。

您的应用服务器是什么?根据它可能有配置选项。