Shortening URLs
| From: | Martin Jansen | Date: | Fri, 03 Mar 2006 11:38:53 +0000 |
| Subject: | Shortening URLs | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-7637@lists.php.net to get a copy of this message | ||
Right now a lot of URLs in the manual are *really* long, and look
totally ugly. Just look at
http://pear.php.net/manual/en/package.fileformats.spreadsheet-excel-writer.spreadsheet-excel-writer-format.setfgcolor.php
to see what I mean.
What I'd like to suggest is that we come up with a plan to cut down the
length of the URLs drastically by reducing the payload of information
they are currently carrying. First of all I don't think we need the
category name in the URL. There are no packages with the same name in
different categories AFAICS and thus this information is not needed at
all. Getting rid of the category results in
http://pear.php.net/manual/en/package.spreadsheet-excel-writer.spreadsheet-excel-writer-format.setfgcolor.php
Not bad for starters, but still too long. Next I suggest we replace the
"package." prefix with something much shorter. I think "p." works fine
here. Alternatively we could get rid of that prefix altogether, but I
think we should have at least something in the URL to denote the section
where this is from. So now we have:
http://pear.php.net/manual/en/p.spreadsheet-excel-writer.spreadsheet-excel-writer-format.setfgcolor.php
Concerning manual-wide optimizations, I believe we can't reduce the
length any further. What now remains is optimization on a lower level.
In case of Spreadsheet_Excel_Writer we could e.g. replace the above URL
with something like
http://pear.php.net/manual/en/p.spreadsheet-excel-writer.format.setfgcolor.php
What needs to be done technically is that someone (I volunteer to be
that one) plows through all files in CVS and changes the id attributes
of the DocBook sources to the new schema. This should be possible with
a little bit of scripting magic.
Thoughts? Suggestions?
- Martin