Favicon不在Edge上工作 [英] Favicon NOT working on Edge

查看:429
本文介绍了Favicon不在Edge上工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为本地服务器php项目生成的favicon存在问题。它在大多数浏览器(谷歌浏览器,Mozilla Firefox和Opera)上运行良好,但在Microsoft Edge上无效(显示默认选项卡图标)。

已经尝试了许多解决这个问题的方法,例如清除缓存,使用图片格式(.png)而不是图标(.ico),但似乎没有任何效果。



HTML头部包含的代码行:

 < link rel =iconhref =<< ;?php echo Yii :: $ app-> request-> baseUrl;?> /favicon.icotype =image / x-icon/> 
< link rel =shortcut iconhref =<?php echo Yii :: $ app-> request-> baseUrl;?> /favicon.icotype =image / x- icon/>

任何人都有同样的问题并解决了它?

解决方案

对于我来说,问题是在localhost上它从来没有在Edge中工作过。不管我做了什么。 Chrome和Firefox一直很好。解决方案是,只有在部署到Web服务器后才能在Edge中运行。

I have a problem with this favicon I generated for a local server php project. It works fine on most browsers (Google Chrome, Mozilla Firefox and Opera) but on Microsoft Edge it doesn't work (It shows the default tab favicon).

I've tried many solutions to this problem like clearing the cache, using image format (.png) instead of icon (.ico), but nothing seemed to work.

Here are the lines of code that I've included in the HTML head:

<link rel="icon" href="<?php echo Yii::$app->request->baseUrl; ?>/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo Yii::$app->request->baseUrl; ?>/favicon.ico" type="image/x-icon" />

Anyone had the same issue and solved it?

解决方案

For me the problem was that on localhost it never worked in Edge. No matter what I did. It was always fine in Chrome and Firefox. The solution was that it only worked in Edge after I deployed to the webserver.

这篇关于Favicon不在Edge上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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