How to set “default” value for history.pushState and replaceState?

后端 未结 1 594
醉梦人生
醉梦人生 2021-01-24 18:09

For browsers that use the title param, what value should we use to tell the browser to use its default?

In Safari 5.1.7 (7534.57.2), i

1条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-24 18:27

    Not sure if there is a specific way of setting it to a default title, but a safe way which should work in all browsers is setting the title to the location.href

    document.title = location.href;
    

    0 讨论(0)
提交回复
热议问题