On mer, 2002-12-25 at 22:51, Jonathan Walther wrote:
On Wed, Dec 25, 2002 at 08:39:44PM -0800, Brion Vibber wrote:
Should be straightforward -- just use %26 wherever it represents content and & where it's a magic query string component separator:
http://foobar/wiki/Beeswax_%26_Honey http://foobar/wiki/Beeswax_%26_Honey?action=edit http://foobar/wiki/Special:Whatlinkshere?target=Beeswax_%26_Honey&limit=...
Actually, Brion, because mod_wiki is a module in it's own right, the URL can be in any format we like; it doesn't need to be ?foo=bar&x=y format.
The backend implementation is not relevant. By using mod_rewrite, the URL can be in any format we like with the PHP system. But that's no excuse for making URLs long, confusing, and fragile.
Maybe we could use an alternate minilanguage. For instance, I'm also thinking that the namespace should be a variable instead of a part of the title:
Then the following would get passed in as POST data: namespace=Special&target=A%26W+Root+Beer&limit=500
That, I think, would be annoying, as you couldn't bookmark it or send someone a URL without digging through backroom docs for the magic incantation.
How about the following?
http://foo/w/Whatlinkshere#ns=Special&target=A%26W+Root+Beer&limit=5...
Standard URL syntax provides for a query string (starting with "?"), we shouldn't be afraid to use it. Overloading the anchor syntax (starting with "#") isn't a good idea, as I believe it won't be sent to the http server, and is intended to be interpreted by the browser (and would break the asked-by-some ability to actually use anchors in pages). Technically you could use the hex-code for #, but that's fragile. (Somebody's going to try to type it, and it won't work.)
I also would like language to be a variable, so the URL would become:
http://foo/w/Whatlinkshere#ns=Special&lang=en&target=A%26W+Root+Beer...
I'd prefer: http://foo/en/Special:Whatlinkshere?target=A%26W+Root+Beer&limit=50
or, knowing that many special pages operate explicitly on a target, one could rearrange, folding most of them back into the already existing "action" sequence:
http://foo/en/A&W_Root_Beer?action=whatlinkshere&limit=50 http://foo/en/User:Billybob?action=contributions
Or even yet, we could take advantage of the path syntax, as long as special pages are never named with slashes:
http://foo/en/Special:Whatlinkshere/A&W_Root_Beer?limit=50 http://foo/en/Special:Contributions/Billybob
This has the advantage also of preserving ampersand functionality; ampersands aren't special in the _path_ portion of a URL, so if someone types them in raw it's okay, whereas it will generally break if someone puts in a raw ampersand when constructing a query string.
Remember, URLs should be human-readable and human-rememberable if possible; people *will* try to muck about with them manually. They *will* e-mail URLs to friends and colleagues. They *will* print them and send them to other people who will have to type them in. They *will* try to speak them over the phone. Non-ascii characters and special punctuation marks can be a pain for this, alas, but we should minimize the trouble we make in the basic syntax.
-- brion vibber (brion @ pobox.com)