Page title is not changed by history.pushState

后端 未结 4 1362
一个人的身影
一个人的身影 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条回答
  •  萌比男神i
    2021-02-03 20:49

    Setting the title using document.title is not recommended if you want good SEO.

    History.js gracefully supports the HTML5 History/State APIs (pushState, replaceState, onPopState) in all browsers. Including continued support for data, titles, replaceState. Supports jQuery, MooTools and Prototype.

    Demo

    Source

提交回复
热议问题