【发布时间】:2020-03-23 06:50:12
【问题描述】:
get(config): 可观察的 {
const headers = new HttpHeaders({
...config.headers,
'Cache-Control': 'no-cache',
'Pragma': 'no-cache',
});
const url = config.url;
let response = this.httpClient.get(url, { headers, params : config.params });
return response;
}
我已经使用了添加标题的解决方案{ 'Cache-Control': 'no-cache','Pragma': 'no-cache',} 用于 AJAX 调用。
【问题讨论】:
-
那么什么你现在的问题是什么?
-
get 调用正在从 IE 11 的缓存中获取数据。它在 Chrome 中运行良好。我已经添加了标题,但仍然遇到同样的问题。
-
也许这个github.com/jhipster/generator-jhipster/issues/777可以解决你的问题。