Firefox, Googlecode and Mime Types

So we moved a bunch of the css and images (scripts coming soon) to google code and noticed something. pcapr now directly mashes up images and css from svn/trunk on google code to your browser. But…

The default mime type returned by code.google.com for *.css is text/plain. In standards mode, Firefox 3 just rejects this because of the Content-Type, while Safari and IE don’t seem to care. So, turns out there’s a way to tweak the mime type in svn which Google then returns properly when navigating to the URL.

For each of the css files, do this:

svn propset svn:mime-type text/css page.css

and voila’! I’m sure this is documented somewhere, but wasn’t easy to find.

Bookmark and Share