Page title is not changed by history.pushState

后端 未结 4 1313
一个人的身影
一个人的身影 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:35

    It seems current browsers don't support pushState title attribute. You can easily achieve the same thing by setting it in JS.

    document.title = "This is the new page title.";
    

提交回复
热议问题