On IE CSS font-face works only when navigating through inner links

后端 未结 8 961
没有蜡笔的小新
没有蜡笔的小新 2020-12-01 06:30

Our webdesigner has created a CSS with the following font-face:

@font-face {
    font-family: \'oxygenregular\';
    src: url(\'oxygen-regular-webfont.eot\')         


        
8条回答
  •  甜味超标
    2020-12-01 06:50

    I just had the same bug, and for those who want to have a pure solution (non exact-technology related): you need to make sure that the font headers you're sending are not saying no-cache. On top of what was written before, there are actually two headers which can do it:

    "cache-control: no-cache"
    

    and

    "pragma: no-cache"
    

    Both of those are saying browser the same, the first one is part of HTTP1.1, the second one is older (HTTP1.0).

    Now, solutions:

    • If you really want to serve the fonts (and other files?) without client-side caching, set "cache-control" to "max-age=0"; you can drop pragma header, it's obsolete (or set it to "pragma: cache").
    • If you actually want to have caching: remove no-cache values, and set proper max-age (e.g. "cache-control: max-age=3600" - one hour cache). Pragma can be set to "pragma: cache" or removed completely.

提交回复
热议问题