Font Awesome icon not displaying in Safari and iPad

前端 未结 5 2310
误落风尘
误落风尘 2020-12-14 04:36

I have been using Font Awesome icons for a while now but after a round of bug tracking from an external company they found that the font awesome icons were not displaying in

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-14 05:10

    We are facing same problem. Material icons loads perfectly fine in other browser except in iPad. It loads for the first time, and subsequent load, shows text instead of icon. Tried all solution like self hosting, calling google api and CDN. Nothing worked for us. Any help would be greatly appreciated. But when you refresh the page, the icon gets loaded..

    Work around for this would be to forcefully reload the page during window load and when it is iPad. This should solve the problem.

     var isTabLoaded = sessionStorage.getItem("isTabLoaded") == "true";
              var isUserBrowserIPad = navigator.userAgent.indexOf('iPad') > -1
              if (!isTabLoaded && isUserBrowserIPad) {
                window.location.reload();
                sessionStorage.setItem("isTabLoaded", "true");
              };
    

提交回复
热议问题