开发者

@font-face blocking page download on Chrome

I am using @font-face and my page is being blocked from downloading when my @font-face service provider go开发者_StackOverflow社区es down. ( All requests significantly slow down to a crawl ONLY at the point that the font-face provider's .css file is being requested and this does not occur when the service provider's .css loads smoothly )

Everything I have read suggests that this should ONLY happen in IE and only when there is a tag above the css call. However, I am encountering this problem on Webkit browsers and I am being sure to call the css file prior to any script tags.

Has anyone else encountered this problem? Do you know what could be causing it or how to alleviate it?


For anybody running into this. The answer boils down to how CSS is parsed and loaded by browsers. Browsers will wait for all css to be loaded before rendering a page. Since the css/font host's servers were slow, it was blocking my page from rendering.

My solution was to host the fonts through a cdn service that was much more reliable than the font hosting company.


What provider are you using? i have experienced it sometimes with fonts.com, either way you should test with yslow http://developer.yahoo.com/yslow/ ask if you provider if they are on a CDN and if they have been experiencing problems lately, what embed method are you using, is it a javascript loader, a stylesheet link, or a stylesheet import. either way make sure you read this

http://code.google.com/speed/page-speed/docs/rtt.html make sure you read the part where it talks about "AvoidCssImport"

hope this helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜