简体   繁体   English

.woff 图标仅适用于 IE 11 中的第一页加载

[英].woff Icons Only Works on First Page Load in IE 11

We have a website which implements a custom font face.我们有一个实现自定义字体的网站。

This work every time in IE on our test server.每次在我们的测试服务器上的 IE 中都可以这样做。 When we move to production it works but only the first time it loads the page.当我们进入生产环境时,它可以工作,但仅在第一次加载页面时。 enter image description here If I delete my temp internet file and reload the page it will work again.在此处输入图像描述如果我删除临时 Internet 文件并重新加载页面,它将再次工作。

I've used font squirrel to produce their so-called "bulletproof" css.我使用 font squirrel 来制作他们所谓的“防弹”css。 here is my custom header code.这是我的自定义标题代码。

here is font-face code这是字体代码

 @font-face { font-family: 'icomoon'; src: url('fonts/icomoon.eot?48s99'); src: url('fonts/icomoon.eot?48s99#iefix') format('embedded-opentype'), url('fonts/icomoon.ttf?48s99') format('truetype'), url('fonts/icomoon.woff?48s99') format('woff'), url('fonts/icomoon.svg?48s99#icomoon') format('svg'); font-weight: normal; font-style: normal; }
 <customHeaders> <add name="Cache-Control" value="no-cache, no-store, must-revalidate" /> <add name="Pragma" value="no-cache" /> <add name="Expires" value="-1" /> <add name="Strict-Transport-Security" value="max-age=16070400; includeSubDomains" /> </customHeaders>

here is the image after reloading the page it throws 404 not found这是重新加载页面后的图像,它抛出 404 not found 在此处输入图片说明

If Cache Control is set to no-cache font-face will not work in IE after the first load.如果缓存控制设置为 no-cache font-face 在第一次加载后将不会在 IE 中工作。 Try testing with caching on and off to help debug.尝试打开和关闭缓存进行测试以帮助调试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM