history.replaceState still adds entries to the “Browsing History”

ぐ巨炮叔叔 提交于 2019-12-20 12:28:19

问题


Specifically, calling the following snippet of code:

history.replaceState(undefined, undefined, "#" + value)

will correctly not affect the back button behavior of the current page, but will add an entry to the "browsing history" page, which I don’t want. Pictured below is Chrome’s History page, but this also happens in Firefox.

Is there some way to replace the current URL without adding an entry to the user’s browsing history?

I’m inquiring about the standalone Browser History page, not the actual page navigation history that the Back button uses.

来源:https://stackoverflow.com/questions/26793130/history-replacestate-still-adds-entries-to-the-browsing-history

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!