Search code examples
jsonfirefoxcontent-type

Adding custom content-types to Firefox application handler?


In Firefox, whenever I request a page that returns a Content-type of "application/json", Firefox saves the file into /tmp but then says "/tmp/json.php could not be opened, because the associated helper application does not exist. Change the association in your preferences." Well, I go into Edit > Preferences > Applications, and there's no content type listed there that seems to have anything to do with application/json.

Is it possible to add an entry for this type? (Or for a random custom type I make up, like "foo/bar"?) I see a file called mimeTypes.rdf which looks promising.


Solution

  • Ok, it is the mimeTypes.rdf file which controls these things, so I'll just edit it by hand. (Or go find an add-on.)