Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 render 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?

like image 614
Ryan DeBeasi Avatar asked Aug 31 '11 16:08

Ryan DeBeasi


1 Answers

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!

like image 71
cdeszaq Avatar answered Oct 23 '22 07:10

cdeszaq