Click here to Skip to main content
15,867,834 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

We have the a website which implements a custom font face.

This work every time in IE on our test server. When we move to production it works but only the first time it loads the page. If I delete my temp internet file and reload the page it will work again.

I've used font squirrel to produce their so called "bullet proof" css.

The CSS is as follows:

CSS
@font-face {
font-family: 'My Font';
src: url('my_font.eot');
src: url('my_font.eot?#iefix') format('embedded-opentype'),
     url('my_font.woff') format('woff'),
     url('my_font.ttf') format('truetype'),
     url('my_font.svg#my_font') format('svg');
font-weight: Bold;
font-style: normal;
}


I have the mime types as follows:

.eot application/octet-stream
.woff application/x-font-woff
.ttf application/octet-stream
.svg image/svg+xml

Any help would be appreciated... This problem is driving me crazy! Also getting chased by our client too!

Furthermore, when I run the network trace I can see IE successfully loading the font files for all requests. IE loads the EOT, TTF and WOFF.
Posted
Updated 18-Sep-14 1:17am
v2

1 solution

I found the solution.

IE will not work with font-face for subsequent requests within the same session if the caching is turned off.

The font folder had

Cache-Control: no-cache
Expires: -1
Pragma: no-cache

This breaks font-face in IE beyond all but the original request.

This is definitely a bug as tracing with caching off, IE definitely loads the fonts with each request but it fails to implement them successfully.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900