font awesome icon is not appearing in IE 11, but showing in other browsers

前端 未结 16 1399
孤城傲影
孤城傲影 2020-12-01 06:40

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

相关标签:
16条回答
  • 2020-12-01 07:08

    Alternatively, it might be your Internet Explorer settings that prevent the browser from downloading fonts. This was the case on one of our tightly secured servers.

    Try these steps:

    1. Open Internet Explorer
    2. Go to Internet Options
    3. Under Security tab, click on Custom Level...
    4. Scroll down to Downloads and make sure the Font Download is Enabled

    0 讨论(0)
  • 2020-12-01 07:08

    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!

    0 讨论(0)
  • 2020-12-01 07:10

    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>
    
    0 讨论(0)
  • 2020-12-01 07:15

    From IE console try to run following script

    $('head').append('<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" type="text/css" />');
    

    If it work then try to import it CDN instead of storing it locally.

    0 讨论(0)
  • 2020-12-01 07:15

    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.

    0 讨论(0)
  • 2020-12-01 07:16

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

    0 讨论(0)
提交回复
热议问题