超链接跳转返回时接口报错 Strict-origin-when-cross-origin

往返缓存 Back-forward cache 的强制缓存模式导致 Strict-origin-when-cross-origin 请求错误

Chrome浏览器自带的往返缓存插件Back-forward cache的默认模式是Enable force caching all pages。该模式会强制缓存所有页面,在点击超链接跳转后点击回退,会从缓存中取页面,不会重新渲染页面。接口会出现出现Strict-origin-when-cross-origin报错,且状态一直显示为pending,因为这次的接口请求其实未发出。

解决方法:
Chrome浏览器打开 chrome://flags/
搜索Back-forward cache,修改模式为除了Default和Enable force caching all pages以外的另外三种模式都可以解决该问题。 超链接跳转返回时接口报错 Strict-origin-when-cross-origin_第1张图片

你可能感兴趣的:(chrome,缓存,java,js)