Until a few days ago, if you’d wanted to use a web font (@font-face) hosted on AWS S3 within a document on another domain (ie. an EC2 instance) – unless you were happy with the near-crazy Base64 embedding into bloated CSS file technique – you’d be out of luck when it came to the goodie-two-shoes of web browsers, Firefox.
Firefox would demand that you specify an “Access-Control-Allow-Origin” header on your server’s response. This is not rocket science when it comes to serving files from a regular web server such as Apache, but of course S3 is very different to all of the other kids (with good reason). It was just a shame that S3 didn’t have a way of specifying such a header bucket-wide, until now.
I have to admit, that this was a task I wanted to accomplish quickly. The kind of ‘quickly’ where you just do a Google search and nice internet person tells you which APIs to use. But no such internet person seemed to exist, so I figured I’ll share my solution.
Posted by Philip Bulley | Filed under Tips
I’ve been using Alessandro Crugnola’s FlashTracer Firefox Add-on for years, and have become pretty accustomed to it’s neat vertical sidebar integration. I wasn’t particularly happy to see that the familiar interface had (subtly) changed when he introduced FBTracer aka FlashTracer for Firebug (pretty sure that’s just me being fussy though!).
The original FlashTracer is apparently only compatible up to Firefox 3.x, so to get it to work with Firefox 4+, simply do the following:
- Download the .xpi
- Unzip it (it’s just a .zip file with a .xpi extension)
- Open install.rdf and change em:maxVersion=”3.9″ to em:maxVersion=”20″ – this will keep Firefox from complaining up until the release of Firefox 20 (which at this rate, we’re probably only a couple of weeks away from!)
- You may want to increase the version number to 2.4 (em:version=”2.4″), to prevent confusion
- Zip all of the files back up, change the file extension to .xpi
- Drag the .xpi file onto Firefox 4+, and it should install
I’ve installed it with Firefox 9.1 and the only incompatibility (that I’ve noticed so far) is that you can’t change the font from the default serif. Not bothered :)
By the way, this minor hack works for making any Firefox Add-on compatible with a more recent version of Firefox. But of course, if the actual Add-on source code itself is not compatible with a recent Firefox version, it might crash, mess up your Firefox profile, brick your computer, automatically slaughter all wild foxes in your local area, etc, which of course,
I couldn’t care less about I’m not responsible for :)