开发者

Meta Refresh with #-anchor going into loop

The following construct,

<meta http-equiv="refresh" content="3;url=#scroll" />

when accessed from http://localhost/, redirects all browsers to http://localhost/#scroll, and no further redirecting occurs as expected.

However, when the very same construct is used from the target url, h开发者_开发技巧ttp://localhost/#scroll, firefox and opera keep refreshing the page every 3 seconds, making http requests to the server, regardless of the fact that the url for redirect has already been reached.

Is there any explanation and/or fix for this?

NB for possible solutions: JavaScript is unavailable in this specific situation.


In case you're interested, what Firefox is doing is that it normally treats meta refresh as a forced new document load. But in the case where the URI changes within 15 seconds, it changes it to a replace. And then later on this lets the anchor scroll check succeed.


I don't think meta refresh was designed to jump to anchors.

If you can't use JavaScript, you can't automate it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜