font awesome icon is not appearing in IE 11, but s

2020-01-28 03:49发布

I am new to font-awesome icons. I have one page in which there is a filter where user can search the data. I have added font awesome icon just before the search link (as per below screenshot), I can see this icon in all the browsers except IE 11. The funny thing is I have this icon in other pages also and I can see it in IE 11, but I cannot see this icon on this (as per below screenshot) page only.

Here is the screenshot from IE 11:

enter image description here

Here is the screenshot from chrome:

enter image description here

Can anyone help me out on this?

13条回答
Ridiculous、
2楼-- · 2020-01-28 04:14

In my case, it was corrupted .eot font file. I had generated new one ( + new .css styles) and it fixed the problem. Try it.

查看更多
The star\"
3楼-- · 2020-01-28 04:19

I had the same issue, I solved it by adding this meta tag as the FIRST tag in <head>:
<meta http-equiv="X-UA-Compatible" content="IE=edge">

Also, according to the official documentation, check the following:

For Internet Explorer: you don't serve files with no-store option in Cache-control header (Ref: #6454);
For Internet Explorer and HTTPS: you don't serve files with no-cache option in Pragma header.

查看更多
小情绪 Triste *
4楼-- · 2020-01-28 04:22

This fixed my font-icons in IIS: Add a web.config to your font directory with these contents:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <httpProtocol>
            <customHeaders>
                <add name="Pragma" value="none" /> 
            </customHeaders>
        </httpProtocol>
    </system.webServer>
</configuration>
查看更多
我命由我不由天
5楼-- · 2020-01-28 04:23

I faced the same Issue and I just added the following Link in the Tag and it worked.

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

Hope this helps!

查看更多
走好不送
6楼-- · 2020-01-28 04:25

I had the same issue with font awesome. I added a custom httpmodule in my .net application.

public class MyHttpModule : IHttpModule
    {
        public void Dispose()
        {
        }
        public void Init(HttpApplication context)
        {
            context.EndRequest += new EventHandler(Context_EndRequest);
        }
        protected void Context_EndRequest(object sender, EventArgs e)
        {
            HttpResponse response = HttpContext.Current.Response;
            if (string.Compare(HttpContext.Current.Request.Browser.Browser, "InternetExplorer", StringComparison.InvariantCultureIgnoreCase) == 0)
            {
                response.Headers.Set("Pragma", "none");
            }
        }
    }

And registered the module in web.config.

<system.webserver>
    <modules>
          <add type="MyHttpModule, Culture=neutral" name="MyHttpModule"/>
    </modules>
</system.webserver>

It solved the issue.

查看更多
▲ chillily
7楼-- · 2020-01-28 04:26

I had the same issue with Font Awesome 4.7 and IE 11. I fixed it by adding the following meta info in the <head> section:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
查看更多
登录 后发表回答