问题
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