cdn 字体
For maximum performance, we all know we must put our assets on CDN (another domain). Along with those assets are custom web fonts. Unfortunately custom web fonts via CDN (or any cross-domain font request) don't work in Firefox or Internet Explorer (correctly so, by spec) though they do work (incorrectly so) in Webkit-based browsers. They actually require custom CORS configurations to display properly. Here's the code you'll need to make that happen.
为了获得最佳性能,我们都知道我们必须将资产放在CDN(另一个域)上。 与这些资产一起的是自定义Web字体。 不幸的是,通过CDN定制的Web字体(或任何跨域字体请求)在Firefox或Internet Explorer中(按规范正确地)不起作用,尽管它们在基于Webkit的浏览器中确实(不正确地)起作用。 他们实际上需要自定义的CORS配置才能正确显示。 这是实现该目标所需的代码。
.htaccess
或httpd.conf
代码 (The .htaccess
or httpd.conf
Code)
The code can be placed with the .