@font-face does not work in IE on initial page load, but does after that

别说谁变了你拦得住时间么 提交于 2019-12-23 05:38:07

问题


We have a problem whereby we successfully implemented @font-face for IE6-9 as normal, and in fact on the client site in question it all worked fine.

Then we copied the skin over to two new sites for client (testing and production) whereby the font replacement still worked as expected. Over night these sites had SSL certs applied.

The following morning it appeared that font replacement was no longer working much to our annoyance. Throughout this period of 'discovery' and 'anguish' @font-face worked in everything but IE.

After a fair bit of mucking about thinking the whole thing was broken we realised that the problem only occurred on a pages first load. If you clicked on the sites menu and went to another page with a font replaced element @font-face worked as expected (IE6 and up).

So the question for you all is, why does @font-face not work on first page load, but works fine when you navigate through said site's page thereafter?

Could it have anything to do with IE and SSL?, perhaps something kills IE's rendering on first load due to the extra security checks going on in the background, which are eliminated by the time a user browses to another page within the site.

@font-face {
font-family: 'BrisaAlternatesRegular';
src: url('/morph2/css/brisaalt-webfont.eot');
src: url('/morph2/css/brisaalt-webfont.eot?#iefix') format('embedded-opentype'),
     url('/morph2/css/brisaalt-webfont.woff') format('woff'),
     url('/morph2/css/brisaalt-webfont.ttf') format('truetype'),
     url('/morph2/css/brisaalt-webfont.svg#BrisaAlternatesRegular') format('svg');
font-weight: normal;
font-style: normal;

}

来源:https://stackoverflow.com/questions/7034068/font-face-does-not-work-in-ie-on-initial-page-load-but-does-after-that

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!