IE 11 “sometimes” preventing the display of “font-awesome” webfonts

前端 未结 5 438
半阙折子戏
半阙折子戏 2020-12-31 17:03

Some of our IE11 clients are not seeing the \"font-awesome\" webfonts in our web application. I have done extensive testing with our own IE11 instances, and also via cross b

5条回答
  •  轮回少年
    2020-12-31 17:59

    In my case, I could see this issue only when using Win 10 + IE 11. Even after ensuring correct IE settings (security zone and font download enabled), the font won't render. It seems that cache headers should not be set for fonts.

    We are using Spring MVC and Tomcat. Adding following code in CORS filter solved problem for me.

            if (!request.getServletPath().endsWith(".woff")
                    && !request.getServletPath().endsWith(".ttf")) {
                response.setHeader("Cache-Control", "no-cache");
                response.setHeader("Pragma", "no-cache");
                response.setDateHeader("Expires", -1);
            }
    

    https://stackoverflow.com/a/33508291/828062

提交回复
热议问题