Good URLs are readable, typeable and speakable by humans
- Good:
- Bad:
- Terrible:
- https://xxx.sharepoint.com/sites/XXX-SharePoint/_layouts/15/Doc.aspx?sourcedoc={b8463c1f-0276-45fe-a538-df6a30534f40}&action=edit&wd=target%28🗹%20Getting%20Started.one%7C968d7db9-bb53-4357-b4ab-86a7b0c46a62%2FCommon%20Acronyms%20and%20Initialisms%7C95d1961f-d6dd-40b1-b085-1c5bda48a705%2F%29&wdorigin=NavigationUrl
- https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationMenuBlade/~/Overview/quickStartType~/null/sourceType/Microsoft_AAD_IAM/appId/b7ca4bb7-f816-744d-0876-8e96a58e3dcf/objectId/c8e4fe2e-a57f-3146-bdbf-953859497498/isMSAApp~/false/defaultBlade/Overview/appSignInAudience/AzureADMyOrg/servicePrincipalCreated~/true
Good URLs are stable (long-lived), and ideally do not redirect even once, let alone many times
- Links breaking is bad
- Redirecting is slow and annoying (though better than breaking)
- Redirecting breaks password managers
- Redirecting breeds mistrust
- Redirecting often breaks the back button
- Breaking the back button is breaking the user's browser.
Relative links are a thing
- If index.html is at https://foo.bar.baz/index.html and it has a link to 1.html, you should be able to fetch 1.html from https://foo.bar.baz/1.html. Not in SharePoint and friends.
RESTful URLs do not include URL-encoded function calls
- There is nothing RESTful about this:
https://{site_url}/_api/web/GetFolderByServerRelativeUrl('/Folder Name')/ListItemAllFields
Good URLs use parameters sparingly, and not at all for static resources in their normal state
- No thanks:
?csf=1&web=1&e=gT8vtd: