使用javascript在Chrome中显示文档标题更改 [英] Make document title change visible in chrome with javascript

查看:45
本文介绍了使用javascript在Chrome中显示文档标题更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用更改文档标题

I'm trying to change the document title using

document.title = "My Shiny New Title"

但是该更改在Chrome 51.0.2704.106(正式版本)(64位)中不可见.它确实在javascript控制台中或我使用警报时显示为更改,但在选项卡区域(收藏夹图标旁边)却没有显示

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.

推荐答案

重新启动计算机后,它现在可以工作了(我整夜都将其关闭了).我相信Chrome浏览器一定已经缓存了我网页的标题.

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

这篇关于使用javascript在Chrome中显示文档标题更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆