MimeTypes.rdf: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(→‎See also: added File types and download actions)
(→‎Editing: extended introduction for SeaMonkey and Thunderbird)
Line 4: Line 4:


==Editing==
==Editing==
It's not advisable to edit this file manually because of its complexity and the fact that, in Firefox, the Options dialog provides an interface to edit it. Should you want to edit it manually anyway...
In general, it is not advisable to edit this file manually because of its complexity and the fact that interfaces are provided to edit it (in Firefox, the Options dialog; in SeaMonkey, the Helper Applications settings; in Thunderbird, you ''may'' need to edit it manually if an entry is not shown due to [https://bugzilla.mozilla.org/show_bug.cgi?id=311138 bug 311138]).


The file is an RDF document containing one RDF:Seq and many RDF:Descriptions (one for each [http://developer.mozilla.org/en/docs/Properly_Configuring_Server_MIME_Types MIME type]). Each entry has an identifier - the attribute RDF:about. To delete an entry, delete both its RDF:li in the RDF:Seq and its RDF:Description. To change an entry, simply change the RDF:Description's attributes (do not change RDF:about). To add an entry, insert a new RDF:li into the RDF:Seq and create a new RDF:Description, making sure their identifiers match.
The file is an RDF document containing one RDF:Seq and many RDF:Descriptions (one for each [http://developer.mozilla.org/en/docs/Properly_Configuring_Server_MIME_Types MIME type]). Each entry has an identifier - the attribute RDF:about. To delete an entry, delete both its RDF:li in the RDF:Seq and its RDF:Description. To change an entry, simply change the RDF:Description's attributes (do not change RDF:about). To add an entry, insert a new RDF:li into the RDF:Seq and create a new RDF:Description, making sure their identifiers match.

Revision as of 13:52, 30 August 2007

mimeTypes.rdf stores information about which action is to be performed when downloading certain types of files, such as opening the file in a specific program or saving it to disk. In Firefox, this information can be viewed in Tools -> Options -> Downloads -> View & Edit Actions; in Mozilla Suite, in Edit -> Preferences -> Navigator -> Helper Applications.

Editing

In general, it is not advisable to edit this file manually because of its complexity and the fact that interfaces are provided to edit it (in Firefox, the Options dialog; in SeaMonkey, the Helper Applications settings; in Thunderbird, you may need to edit it manually if an entry is not shown due to bug 311138).

The file is an RDF document containing one RDF:Seq and many RDF:Descriptions (one for each MIME type). Each entry has an identifier - the attribute RDF:about. To delete an entry, delete both its RDF:li in the RDF:Seq and its RDF:Description. To change an entry, simply change the RDF:Description's attributes (do not change RDF:about). To add an entry, insert a new RDF:li into the RDF:Seq and create a new RDF:Description, making sure their identifiers match.

Attributes

  • General
    • RDF:about - identifier
    • NC:description - the name of the file type that will be displayed on the download prompt
  • Choosing what to handle
    • NC:fileExtension - file extensions to handle (note that content downloaded from the Internet will go by MIME type, not by file extension)
    • NC:value - MIME type to handle
  • Choose how to handle it (absence of the following options means "download to disk")
    • NC:path - path of the application to use to open this file
    • NC:useSystemDefault - true (use the system default for this MIME type) or false (define a different action)
  • Additional options
    • NC:alwaysAsk - true (always ask which action to perform) or false (don't ask which action to perform)
  • Unknown
    • NC:editable
    • NC:prettyName

Moving

This file can be moved to a different profile. If some MIME types specify a path for a program to use, this path must be correct on the destination profile's system.

Deleting

Deleting mimeTypes.rdf will clear the associations between MIME types and programs. A new file will be created on start up or when the application first needs to write to the file.

Related bugs

See also