开发者

Why would the Google Font API fail on a modern browser?

开发者 https://www.devze.com 2023-04-02 01:56 出处:网络
I\'ve noticed that at work, Google Web Fonts do not appear on IE9 and Firefox 6 (Windows and Mac OS). All the files are loaded, but the fonts are never rendered. This works properly from home on those

I've noticed that at work, Google Web Fonts do not appear on IE9 and Firefox 6 (Windows and Mac OS). All the files are loaded, but the fonts are never rendered. This works properly from home on those same browsers. Chrome doesn't exhibit this problem. Additionally, sites using FontSquirrel CSS (and hosting the font files themselves) work fine in IE9 and Firefox 6. None of these problems appear for me at home. Screenshot: http://cl.ly/9lQu

I've read that IE9 and Firefox will not ren开发者_运维知识库der web fonts from outside sites if they're not served with the proper Access-Control-Allow-Origin settings in the HTTP headers - they treat it similarly to how they'd treat a cross-site-scripting issue. I don't see access-control-allow-origin in the response headers. Screenshot: http://cl.ly/9luS

I know Google should be taking care of this, but is it possible that something's modifying these headers by the time they get to me? Are folks aware of any instances where ISPs or firewalls modify these headers? Is there a workaround?


Since you said things don't work "at work" but they do "at home", there's a really high probability that there is some sort of proxy on your work network and that is the source of the issue. My employer heavily filters our network and restricts the sites we go to, but in general does not modify any header information on inbound traffic (that I've seen, at least).

To check this, you might want to consider using a packet sniffing program such as fiddler, wireshark, or ethereal. Any of these tools will let you inspect the packets going in and out of your computer. Once you can see exactly what is going on deep down at the network level, you can compare what you see at work and what you see at home.

My suspicion is that there is a filtering proxy that you are going through at work that is messing with things (possibly unintentionally), but please post back and let us know what you find!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号