[whatwg] Simple Links

Aryeh Gregor Simetrical+w3c at gmail.com
Wed Jul 28 10:32:41 PDT 2010


On Tue, Jul 27, 2010 at 3:13 PM, Ian Hickson <ian at hixie.ch> wrote:
> I also randomly picked a Wikipedia page (Potato) and looked at some of the
> links there. The only link that matched that pattern on the whole page was
> in the footer that only gets displayed in the print media:
>
>   <div class="printfooter"> Retrieved from "<a href="http://en.wikipedia.org/wiki/Potato">http://en.wikipedia.org/wiki/Potato</a>"</div>

For what it's worth, this is because the href's in the articles
themselves have /wiki/ prepended (<a href="/wiki/Potato">, not <a
href="Potato">).  In turn, this is because the pages can actually be
served from multiple directories: http://en.wikipedia.org/wiki/Potato
is the same as http://en.wikipedia.org/w/index.php?title=Potato.
(There are actually some differences at the moment if you do a diff,
but that's because they're cached separately by Squid.  If you log in,
the differences should disappear.)  So href="Potato" would do the
wrong thing in the latter case.

Indeed, in a dynamic web application, something like href="Potato" is
practically useless unless you can guarantee that you're always
rewriting URLs to look pretty and conceal the actual script serving
the request.  So in particular, MediaWiki could not use the proposed
<a href> syntax.



More information about the whatwg mailing list