【发布时间】:2013-05-15 16:07:15
【问题描述】:
我想在 Firefox 中禁用历史 API,因此 history.js 将使用带有哈希的回退机制。这样可以避免使用 IE 来测试/开发回退功能。
谢谢
【问题讨论】:
-
window.history = null; delete window.history;? -
这个属性好像是不可移除的。在您的代码之后,该属性仍然存在。
-
其实不要做
delete window.history部分 -
这段代码还是改变了url:delete window.history; window.history.pushState({}, "title", "/newpath");
-
我说不要包含
delete window.history;部分。 仅执行window.history = null;...然后尝试访问window.history或history
标签: javascript google-chrome firefox history.js