Page title is not changed by history.pushState

后端 未结 4 1314
一个人的身影
一个人的身影 2021-02-03 20:01

I\'ve just opened a blank HTML page with some little amount of base tags (like html, body, head, etc) in Google Chrome, and tried to execute the following command in console:

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-03 20:33

    Currently, the title is being changed in all modern browsers using history.push(), but you have to change the URL. If you only add "#locationhash" it won't change the title, which makes sense.

提交回复
热议问题