438 posts
  • Has been part of the Envato Community for over 3 years
  • Sells items exclusively on Envato Market
  • Located in United States
christopherjon says

Anybody know of a way to prevent IE from downloading all webfonts (@font-face)?

Chrome and Firefox play nicely and only load fonts that are used on the page but IE will download every font in a style sheet regardless if it’s used on the page or not. As you can guess, this can make for some really really long load times.

3247 posts
  • Has sold $5,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Located in United States
  • Has been part of the Envato Community for over 4 years
+1 more
organicbee says
<!--[if !IE]>
   <link type="text/css" rel="stylesheet" href="css/typography.css" media="screen">

<![endif]-->
438 posts
  • Has been part of the Envato Community for over 3 years
  • Sells items exclusively on Envato Market
  • Located in United States
christopherjon says

Thanks, but not quite what I was looking for.

I probably didn’t describe my issue very well.

Let’s say you are using @font-face, and you put the css for 10 @font-face fonts in your style sheet. IE will automatically load all of those font regardless if they are used on the page or not.

What I’m trying to figure out is how to prevent IE from loading unused fonts.

How it’s being used is I’m using @font-face fonts in the WP editor through some tinymce manipulation.

If I keep the number of fonts available for use limited it doesn’t slow load times down too much but if I want to include the entire google webfont library it kills IE load times due to IE wanting to load all of the fonts.

Firefox and Chrome are smart and only load a font if it’s in use.

by
by
by
by
by
by