桌面图标每个上都带个空白页
I was recently setting up a virtual host and diving into development when I needed to debug a JavaScript issue. One thing that started annoying me right away was the console message notifying me that the favicon.ico file couldn't be found. I hadn't put one there and had no desire to...but that damn message was bugging the hell out of me. I did a quick search and found a tiny data URL snippet to include a blank favicon within the page.
最近,当我需要调试JavaScript问题时,我正在设置一个虚拟主机并开始开发。 立即使我烦恼的一件事是控制台消息,通知我找不到favicon.ico文件。 我没有把它放在那里,也不想……但是那该死的消息使我烦恼。 我进行了快速搜索,发现一个很小的数据URL片段在页面内包含一个空白的图标。
HTML (The HTML)
The empty favicon is created with the LINK element:
空的收藏夹图标是使用LINK元素创建的:
Essentially, instead of linking the external ico file, the image data is placed in the HREF attribute. Cool, huh? No more annoying messages and no need to add another file to the repository.
本质上,图像数据放置在HREF属性中,而不是链接外部ico文件。 酷吧? 不再有烦人的消息,也无需向存储库添加其他文件。
翻译自:
桌面图标每个上都带个空白页