Our webdesigner has created a CSS with the following font-face:
@font-face {
font-family: 'oxygenregular';
src: url('oxygen-regular-webfont.eot');
src: url('oxygen-regular-webfont.eot?#iefix') format('embedded-opentype'),
url('oxygen-regular-webfont.woff') format('woff'),
url('oxygen-regular-webfont.ttf') format('truetype'),
url('oxygen-regular-webfont.svg#oxygenregular') format('svg');
font-weight: normal;
font-style: normal;
}
It works fine on IE and Firefix. But there is an issue: on IE the fonts are rendered correctly only when I navigate the page using inner web page links. If I hit Refresh or Back button, the fonts are replaced by default font (Times New Roman).
Currently the website is using HTTPS but the same problem was observed when using HTTP.
When I navigate using inner website links, in the Network tab of IE Developer tools (Shift - F12), I see the following:
/Content/oxygen-regular-webfont.eot? GET 200 application/vnd.ms-fontobject
When I use Refresh/Back buttons, there are two more entries for the other fonts as well:
/Content/oxygen-regular-webfont.woff GET 200 application/x-font-woff
/Content/oxygen-regular-webfont.ttf GET 200 application/octet-stream
CSS file itself is being loaded in a following way:
/Content/site.css GET 200 text/css
I tried to remove both woff and ttf so I had the following:
@font-face {
font-family: 'oxygenregular';
src: url('oxygen-regular-webfont.eot');
src: url('oxygen-regular-webfont.eot?#iefix') format('embedded-opentype');
font-weight: normal;
font-style: normal;
}
But still IE behaves the same way (except it does not download woff and ttf any more): displays incorrect fallback fonts when navigating through Back/Refresh.
How do I make IE to load correct fonts on Refresh/Back actions?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…