News for hackers. Stuff that matters.
Re:Cool URIs don't change (1998) by Gametroleum on Thursday June 17, 2021 @06:38AM (#27538149)
> What to leave out

> [..]

> File name extension. This is a very common one. "cgi", even ".html" is something which will change. You may not be using HTML for that page in 20 years time, but you might want today's links to it to still be valid. The canonical way of making links to the W3C site doesn't use the extension.(how?)

And the page URL is [...]/URI.html

Re:Cool URIs don't change (1998) by cpach on Thursday June 17, 2021 @06:54AM (#27538227)
It works fine without the suffix as well: https://www.w3.org/Provider/Style/URI
Re:Cool URIs don't change (1998) by yoursunny on Thursday June 17, 2021 @10:19AM (#27539845)
Since I switched from ASP to PHP (2008), I avoided file extensions in page URI in most cases, and instead placed every page into its own folder. This is compatible with every web server without using rewrite rules.

When I switched from PHP to static generators (2017), most URIs continued working without redirects.

Re:Cool URIs don't change (1998) by japanuspus on Thursday June 17, 2021 @07:04AM (#27538301)
Although there is no redirect, the proposed best practice URL also works: https://www.w3.org/Provider/Style/URI
Re:Cool URIs don't change (1998) by ketozhang on Thursday June 17, 2021 @02:00PM (#27542475)
To be fair, it's the OP that chose to use the URL with the extension. However, you could say WC3 could've disable their servers from automatically creating URLs with file extension if they wanted to follow this.

1. https://www.w3.org/Provider/Style/URI works

2. If https://www.w3.org/Provider/Style/URI.html is ever 404 then you get a very useful 300 page (e.g., try https://www.w3.org/Provider/Style/URI.foobar)

3. However, from (2) you can see Spanish page is encoded as `.../URL.html.es` which is bad because `.../URI.es` does not exist

Re:Cool URIs don't change (1998) by usrusr on Thursday June 17, 2021 @06:46AM (#27538186)
A page URL. I guess this could be considered the canonical example of hn not always linking to the coolest source?
Re:Cool URIs don't change (1998) by slver on Thursday June 17, 2021 @08:31AM (#27538872)
> You may not be using HTML for that page in 20 years time

Yes it might be all Flash.