简体   繁体   English

我可以阻止网站图标吗?

[英]Can I block a favicon?

Is there any possibility using javascript to block the favicon of a webpage ?有没有可能使用javascript来阻止网页的图标?

I can change it, but I'm not able to find a way to block the original one.我可以更改它,但我无法找到阻止原始更改的方法。 Is it possible ?有可能吗?

I tried this, without success :我试过这个,没有成功:

var newLink = document.createElement("link");
newLink.setAttribute("rel", "icon");
newLink.setAttribute("href", "###");
document.querySelector("head").appendChild(newLink);

Thank you for your help !谢谢你的帮助!

As far as I know you can delete the favicon from your own webpage by simply removing or renaming it..据我所知,您可以通过简单地删除或重命名它来从您自己的网页中删除网站图标。

I don't think it is possible to have favicons blocked from other websites and why would you want that?我认为不可能阻止其他网站的收藏夹图标,您为什么要这样做?

我认为您不需要阻止网站图标....并且您可以在浏览器设置中阻止它

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM