Page MenuHomePhabricator

Pick a single head tag for the Universal Edit Button
Closed, ResolvedPublic

Description

The Universal Edit Button code originally added a meta tag similar to the following:

<link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Furry_fandom&amp;action=edit" />

A suggestion on the discussion page of the Universal Edit Button website (http://universaleditbutton.org/Talk:Add_The_Link#Linking_Scheme) led to the implementation of a duplicate meta tag to provide the same functionality in r42339, looking something like this:

<link rel="edit" title="Edit this page" href="/w/index.php?title=Furry_fandom&amp;action=edit" />

As $wgUniversalEditButton is on by default, these tags combined take up over 500 bytes in the head of every page rendered by MediaWiki when you have longer, non-English URLs like /w/index.php?title=%D0%92…0%D0%BB&action=edit.

While the use of rel="edit" may actually be cleaner, the fact is it is even less of a standard than that supported by the Firefox plugin. If we're going to have one, it would be better to just pick one.

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:41 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz19165.
bzimport added a subscriber: Unknown Object (MLST).
Krinkle subscribed.

I think this is worth revisiting now that a decade has past. The official implementation (as used for Firefox, Opera, and Chrome browser extension) looks for three selectors:

  • link[rel="edit"]
  • link[rel="alternate"][type="application/x-wiki"]
  • link[rel="alternate"][type="application/wiki"]

The HTML spec by WHATWG points to microformats.org which does now recognise link[rel="edit"] as valid (T42385).

The Wikipedia article on UEB recommends:

  • <link rel="alternate" type="application/x-wiki".

The Drupal plugin (source, docs) implements:

  • <link rel="alternate" type="application/x-wiki".

The WordPress plugin is no longer available, and the UEB official website seems to be broken (archive link, original), but when it last worked, it implemented:

  • <link rel="alternate" type="application/x-wiki"

MediaWiki currently implements these two:

  • <link rel="edit"
  • <link rel="alternate" type="application/x-wiki"

I'm not aware of anything only supporting <link rel="edit", so unless and until such time that we're comfortable removing application/x-wiki I think for now it would make to follow suite and remove <link rel="edit" instead since it adds no value as it stands. This is by no means a new lesson, but the version that becomes popular is the standard. Making it differnet afterwards usually fails adoption, or at best splits the community, especially when there is no added end-user value from the new variant.

Change 722485 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/core@master] OutputPage: Remove redundant \"rel=edit\" head link after \"x-wiki\" link

https://gerrit.wikimedia.org/r/722485

Krinkle lowered the priority of this task from Medium to Low.
Krinkle added a project: Performance-Team.
Krinkle edited projects, added MediaWiki-User-Interface; removed MediaWiki-Parser.

Change 722485 merged by jenkins-bot:

[mediawiki/core@master] OutputPage: Remove redundant \"rel=edit\" head link after \"x-wiki\" link

https://gerrit.wikimedia.org/r/722485