简体   繁体   English

单击后退按钮时重新加载浏览器页面

[英]reload browser page when click back button

When I open any any page in browser and click on back button, it load browser from cache. 当我在浏览器中打开任何页面并单击“后退”按钮时,它将从缓存加载浏览器。 I need to refresh page when I click back button, not load data from browser cache. 单击后退按钮时需要刷新页面,而不是从浏览器缓存中加载数据。 Is there any possible solution? 有没有可能的解决方案?

You might need Request Header Chache-Control 您可能需要请求标题Chache-Control

The Cache-Control general-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. Cache-Control general-header字段用于指定指令,请求/响应链中的所有缓存机制都必须遵守这些指令。 The directives specify behavior intended to prevent caches from adversely interfering with the request or response. 指令指定了旨在防止高速缓存对请求或响应产生不利影响的行为。 These directives typically override the default caching algorithms. 这些指令通常会覆盖默认的缓存算法。 Cache directives are unidirectional in that the presence of a directive in a request does not imply that the same directive is to be given in the response. 高速缓存伪指令是单向的,因为在请求中存在伪指令并不意味着在响应中将给出相同的伪指令。

  Note that HTTP/1.0 caches might not implement Cache-Control and
  might only implement Pragma: no-cache 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM