I like RESTful, user friendly and hacked URLs.
What does it mean? Let's start with user-friendly URLs. For me, a user-friendly URL is easy to remember and easy to remember /Default.aspx?action=show&userID=140 does not meet any of these requirements. A url like `/ users / troethom 'seems logical.
This leads to the next point. Hacking URL is a URL that a user can change and get as a result. If the URL is hacked and my profile URL is /users/troethom , it would be safe to remove my username to get a list of users ( /users ).
Using RESTful URLs is very similar to the ideas behind my other suggestions. You design URLs for the user, not the machine, so the URL should refer to the content, not the technical content of your site. A URL like "/ users" makes more sense than "/ users / list", and a URL like "/ category / programming / javascript" (representing the subcategory "javascript" in the programming category is better than "/ category / show / 12 '.
Indeed, itβs more difficult to omit identifiers, but in my world it is worth the effort.
Also consult the "Understanding URIs" section for general W3C HTTP implementation issues. It has a list of common errors when developing a URI. Another good resource is Resourceful Vs Hackable Search URLs .
Troels thomsen
source share