Make document title change visible in chrome with javascript

僤鯓⒐⒋嵵緔 提交于 2020-01-06 21:10:20

问题


I'm trying to change the document title using

document.title = "My Shiny New Title"

But the change is not visible in Chrome 51.0.2704.106 (Official Build) (64-bit) It does show as changed in the javascript console or when I use alert, but not in the tab area (next to the favicon).

I've found numerous reports that this isn't normal behavior for a web browser, yet I know websites that do change the title. If anyone knows of a workaround for this bug, I'd be extremely grateful.


回答1:


It now works, after rebooting the computer (I turned it off overnight). I believe Chrome must have cached the title of my webpage.



来源:https://stackoverflow.com/questions/38852457/make-document-title-change-visible-in-chrome-with-javascript

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