Page MenuHomePhabricator

A URL action to provide a minimal page existence report
Closed, ResolvedPublic

Description

Scripts, bots, toolserver extensions, and JavaScript extensions would benefit
from a lightweight way of checking a live database for the existence of a given
article by name, and also whether that article is a redirect and what it
redirects to.

Some ways it might work:

http://en.wiktionary.org/w/index.php?title=foo&action=exists

might return a single character:
n=no, it doesn't exist, y=yes, it exists, r=it exists and is a redirect

http://en.wiktionary.org/w/index.php?title=foo&action=isredirect

might return:
yes, no, redirect=bar

or perhaps a tiny XML file could be returned:

<xml>
<page>foo</page>
<exist>1</exist>
<redirect>bar</bar>
</xml>

There are obviously many ways to skin this cat. But the less weight the better
and ease of parsing by JavaScript is a must.


Version: unspecified
Severity: enhancement

Details

Reference
bz6154

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:18 PM
bzimport set Reference to bz6154.

robchur wrote:

I'd suggest this could be a job for the BotQuery extension.

My citation tab JavaScript extension on English Wiktionary
(http://en.wiktionary.org/w/index.php?title=User:Hippietrail/personalsidebar.js)
would use this feature if it existed. Currently it has to load whole pages using
&action=raw just to know if the pages exist. In the worst case it will load two
extra pages per page actually viewed by the user.