Useful URLs : Useful URLs are Hackable

Useful URLs

Useful URLs are Hackable

Guideline

Users should be able to manually manipulate URLs and have them act intuitively.

Discussion

URLs are part of a site's user interface. If a user is viewing one page yet wants another page on the same site, he should be able to manually manipulate the original URL in order to find the content he desires.

For example, consider http://example.com/2005/08/10. Intuitively, one would expect to find the following day's contents at http://example.com/2005/08/11, a list of all content for that month at http://example.com/2005/08, and the content for April Fools Day 2004 at http://example.com/2004/04/01.

Similarly, if http://example.com/products/glark/specs referred to the specifications for the “glark” product, one would expect http://example.com/products/eek/specs to refer to the specifications for “eek”, http://example.com/products/eek to provide general information about the “eek” product, and http://example.com/products to refer to a list of all products the company sold.

To support such exploration, you should adopt the following general principles:

  1. The rightmost part of a URL should be the most specific; the leftmost part should be the least specific.
  2. Directories should contain indexes of the content below them in the hierarchy.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License by Ben Coffey.