6

我想完全删除一些添加的历史条目,history.pushState而不是使用history.replaceState来修改它们。我应该如何实现这一目标?

4

1 回答 1

1

无法编辑以前的历史条目。从历史文档中:

在 History 接口上定义的所有属性的 getter 和 setter 以及所有方法,当在与未完全活动的 Document 关联的 History 对象上调用时,必须抛出 SecurityError 异常

http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#the-history-interface

于 2014-04-08T03:19:36.767 回答