Adding the XPI MIME Type for Firefox Extension Installs
Yesterday I posted version 0.1 of the David Walsh Blog Toolbar for Firefox. Unfortunately that led to an awkward conversation with my .htaccess file.
.htaccess: I have no idea what to do with this.
me: I want the toolbar to install when they request this file.
.htaccess: Well, how am I supposed to do that?
me: OMG! You don't know?!
.htaccess: No, just like you didn't know how to create a Firefox extension before you did the research.
me: Good point. When can you research and start serving it up?
.htaccess: I can't research. I'm a file.
me: Oh. So I just need to figure things out for you again?
.htaccess: You never pay attention to me anymore...
That went on for quite a while but the moral of the story is that if you want your server to handle XPI files correctly, you need to add the following to your .htaccess file:
AddType application/x-xpinstall .xpi
If you don't add the above directive, Firefox will open the file as plain text which is an ugly mess.
![How I Stopped WordPress Comment Spam]()
I love almost every part of being a tech blogger: learning, preaching, bantering, researching. The one part about blogging that I absolutely loathe: dealing with SPAM comments. For the past two years, my blog has registered 8,000+ SPAM comments per day. PER DAY. Bloating my database...
![5 HTML5 APIs You Didn’t Know Existed]()
When you say or read "HTML5", you half expect exotic dancers and unicorns to walk into the room to the tune of "I'm Sexy and I Know It." Can you blame us though? We watched the fundamental APIs stagnate for so long that a basic feature...
![MooTools Overlay Plugin]()
Overlays have become a big part of modern websites; we can probably attribute that to the numerous lightboxes that use them. I've found a ton of overlay code snippets out there but none of them satisfy my taste in code. Many of them are...
![9 More Mind-Blowing WebGL Demos]()
With Firefox OS, asm.js, and the push for browser performance improvements, canvas and WebGL technologies are opening a world of possibilities. I featured 9 Mind-Blowing Canvas Demos and then took it up a level with 9 Mind-Blowing WebGL Demos, but I want to outdo...
Only a web dev could have some kind of decent conversation with a file!
I did wonder why it didn’t install when I clicked it, good to see you found out why though. The ever brilliant David saves the day!
Awesome :)
Is it just me or are .htaccess files getting increasingly uppity lately?
You’re hilarious, dude! Have fun in Cali!!
LOL! i used to have long talks whit .htaccess too.
I envy your relationship with your .htaccess file.