gpt4 book ai didi

firefox - 为什么 Firefox 中的网络字体不能在不同的域上工作?

转载 作者:技术小花猫 更新时间:2023-10-29 11:21:02 28 4
gpt4 key购买 nike

我正在试验 fancy new OpenType font capability在 Firefox 3.5 中,我遇到了一个问题。我试图将字体嵌入到与使用它的页面不同的域中,但没有成功。我认为这可能是一个错误,但根据我在 MDC 引用页面上阅读的内容,我注意到了这条注释:

In Gecko, web fonts are subject to the same domain restriction (font files must be on the same domain as the page using them), unless HTTP access controls are used to relax this restriction.

看起来他们是故意这样设计浏览器的。出于好奇,他们为什么要这样做?嵌入字体有任何安全风险吗?还是为了合法的商标或版权问题?还是别的?

最佳答案

如果你想绕过它,你可以尝试将它添加到你的 .htaccess 中:

Header set Access-Control-Allow-Origin *

要回答您的问题,这可能与以下事实有关,即 Firefox 3.5 版支持 cross-origin sharing standard .

关于firefox - 为什么 Firefox 中的网络字体不能在不同的域上工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2541834/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com