21,998 downloads - November 30, 2015
We have switched to admin only, please email markwdilley@gmail if you would like to edit.

Registered MIME type and Alternatives

From Universal Edit Button

(Redirected from Registered MIME type)
Jump to: navigation, search

The link tag that sites use to announce wiki editing (Add The Link) includes a mime type that is a crucial part of the site-browser signaling. The current browser plug-in accepts two mime types:

 text/wiki
 text/x-wiki

The second version includes an x which is the mime type convention for experimental types. The first form suggests that the text/wiki document format has been registered with IANA.

We think such registration is a good idea. However, it begins by having the document format recognized by a standards body. More information on this process can be found here:

http://www.iana.org/cgi-bin/mediatypes.pl

Alternate Linking Scheme

The linking format suggested on Add The Link uses the LINK element in a very odd way. If this element references another webpage that is used for editing, the type should be text/html or similar, not application/wiki (which really makes no sense as a content-type, since "wiki" is not a data format). Different purposes of links should be distinguished by their rel, title, and href protocol, not their type.

I would suggest proposing an "edit" token to the HTML5 working group to be used in rel and rev attributes (props to Mark). This would denote a link to a page which allows editing of the current resource (when used in rel), or the to the page being edited (rev). The token could be used with "alternate" in a similar way as stylesheets to denote secondary resources, such as edit pages for particular sections. Hence, the use of these tags on an imaginary wiki page might look like so

 <LINK rel="edit" title="Edit this page" href="index.php?title=This_Page&action=edit" />

for a regular page-wide edit, or

 <LINK rel="edit alternate" title="Edit section 2 of this page" href="index.php?title=This_Page&action=edit&section=2" />

for a section edit. The token might also be useful for things like RSD and XML-RPC

 <LINK rel="edit" type="application/xml+rpc" title="RPC interface" href="rpc.php?title=This_Page" />
 <LINK rel="edit" type="application/rsd+xml" title="RSD" href="rpc.php?type=rsd&title=This_Page" />

Note: RSD links currently use "editURI" as their rel token. Perhaps this should be used instead of "edit"? --Max 14:00 Oct 21,2008 (PST)

I fully support rel="edit". Actually, I think I'll just add it to MediaWiki on general principle... (Added on MediaWiki 1.14 dev trunk in r42339) --Brion Vibber 18:04, 22 October 2008 (UTC)

Also see http://friendfeed.com/dewitt/6f758ee1/thoughts-on-universal-edit-button-worth --John Abbe 04:22, 21 June 2009 (UTC)

Recommended Best Practice

Current best practice seems to be:

  • Write browser plugins that recognize both the rel="alternate" and rel="edit" forms.
  • Write new editable applications (including wiki) to use the rel="edit" form.
  • Upgrade existing wiki servers to use both forms
  • Expect direct browser support to not be wiki specific.

The current browser plug-in and Wikipedia implementation are consistent with this advice.

Personal tools