English 中文(简体)
我如何将一个条目插入通过JavaScript浏览历史吗
原标题:
  • 时间:2009-04-16 00:02:20
  •  标签:

我如何将一个条目插入浏览历史所以后退按钮进入不同的页面1然后原始页面点击2点击?

So if you need a good explanation of what I want done, go to: https://secure.exitjunction.com/howitworks.jsp

我只是需要一个脚本,该脚本将允许我插入一个条目在浏览历史点击后退按钮时,用户将对我特殊的页面。

问题回答

这里是一个链接到一个jQuery插件:

< a href = " http://github.com/christianhellsten/jquery-google-analytics/tree/master " rel = " nofollow noreferrer " > < / > jQuery插件

你不能直接操作浏览历史。

这样的特性将被视为安全漏洞(会),所以我怀疑任何浏览器会实现它。

可以虚度光阴,但通过这样的:

注意:这完全取决于在假设介绍人会改变了后退按钮。我不认为这实际发生,所以它很可能不会工作,但嘿。

你有两页,PageA PageB。

  • The user hits PageA
  • The page (on the client, using javascript) checks the HTTP referrer, and if it is not PageB, then it immediately redirects the user to PageB.
  • Now that you re on PageB, if the user clicks the back button, it will go back to PageA.
  • PageA will check the referrer, it willmay be PageB, so there is no redirect.




相关问题
热门标签