开发者

How to force reload of web page after user has followed links off it?

开发者 https://www.devze.com 2023-04-06 01:33 出处:网络
If you follow a link out of my webpage, how can I ensure the webpage reloads when the user returns? Especially: if the link loads in a separate window, how can I reload my webpage then?

If you follow a link out of my webpage, how can I ensure the webpage reloads when the user returns?

Especially: if the link loads in a separate window, how can I reload my webpage then?

I am wondering about the approaches, especially 开发者_如何学JAVAany that avoid javascript, and what their pros and cons are.


The best way to go about this kind of problem is to request the browser doesn't cache the page - so that it simply has to reload each time.

The accepted way to do this is with the Cache-Control HTTP header, specifically setting it to no-cache, however there are a couple of possibilities depending on exactly the behaviour you want.

0

精彩评论

暂无评论...
验证码 换一张
取 消