7 ms·
I don't think `/{year}/{slug}.html` is what people mean when they talk about "ugly" URLs. That moniker, at least for me, is reserved to links that look somethi
by ahmedfromtunis 3y ago
I don't think `/{year}/{slug}.html` is what people mean when they talk about "ugly" URLs.
That moniker, at least for me, is reserved to links that look something like this: `/{endpoint}/{long_hash}?__gtr[0]&__jd__[df]=%ezaz54%d/{another_very_long_hash}[c__f]/`
Now, that's an ugly URL!
- simonw 3y agoWhen we implemented URLs for Django our nemesis was Vignette, a popular CMS at the time (~2003) which frequently included commas in long weird URLs. It's hard to find an example Of one of those now, because the kind of sites that tolerate weird comma-infested URLs in 2003 aren't the kind of sites that meticulously maintain those URLs in working order for 20+ years!
- slig 3y agoHere's one example: https://g1.globo.com/Noticias/Ciencia/0,,MUL347115-5603,00-PESQUISADORES+NO+JAPAO+CRIAM+CEREBRO+QUIMICO.html https://g1.globo.com/Noticias/Ciencia/0,,MUL347115-5603,00-P...
- brlewis 3y agoFrom a more popular site: https://en.m.wikipedia.org/wiki/Girl,_Interrupted_(film) https://en.m.wikipedia.org/wiki/Girl,_Interrupted_(film)
- Symbiote 3y agoThat's not a "weird, comma-infested URL". That's the title of the page. The only Cool URI failure on Wikipedia is the ".m" which is added to the mobile view.
- adamrezich 3y agoone wonders why this is still the case after all these years...
- cqqxo4zV46cp 3y agoBecause Jimmy Wales :didn’t get enough money :(
- simonw 3y agoWikipedia gets a pass from me because the comma is part of the name of the actual film.
- brlewis 3y agoI may have misunderstood your initial comment. Was Vignette a nemesis because letting people migrate to Django from it while preserving URLs involved commas, or was it just a nemesis in general and you're pointing out a flaw in how they did URLs? If the latter then yeah there's no point in me mentioning a mainstream use of commas in URLs.
- simonw 3y agoWe just thought that having URLs with obfuscated IDs and multiple commas in them looked really ugly.
- kqr 3y agoI feel like this is something I've seen a lot of in older ASP-based products also.
- ahmedfromtunis 3y agoWow, when I woke up this morning I had no clue that THE Simon Wilson would be replying to my comment! Right now, I’m knee-deep in coding my Django app. I totally dig how the framework kinda "forces" you to write neat URLs ― it’s one of my favorite things about it. This might seem silly, but I actually take immense pride in crafting simple, elegant URLs, even if the majority of the users won't even notice it. As for the comma infested URLs, the website of one of the major news outlets in my country manifests such behavior. It always puzzled me as to what tech stack they were using. I'm not sayin they still use it today (as Vignette went belly up in 2009), but this can be a heritage from those days. I really enjoy using Django since I first got to know it back in the 2.2 days, I’ve used nothing else for my projects, big or small. I’m head over heels for every bit of it and having recommending it for years to my friends! Big thanks to you, Simon, for helping create this awesome piece of tech!
- throwaway062o 3y agoMy recollection of the "old days" may be a bit hazy, but I think comma delimited parameters were a work around for frameworks that did not support multiple values (or users not knowing how to handle it) Example of a "correct" url ?value=A&value=B&value=C Complete frameworks would have a method that returned the values as a list. Some like PHP required ugly work arounds where you had to name the parameter using the array syntax: value[]=A&value[]=B&value[]=C Even if the framework supported multi-values, many preferred the shorter version: value=A,B,C and split the values in code instead
- rvnx 3y agovalue[]=A&value[]=B&value[]=C is an idea that apparently came out of PHP in ~2000, not of standards. So, people who learnt programming in 2000, until ~2010 it's quite normal to see the commas as delimiter of multiple parameters.
- recursive 3y agoAs far as I know, the "standard" way is value=A&value=B&value=C. This is what comes out of a plain form submission.
- stordoff 3y agoI'm reminded of HUDOC, where navigating the site gives you URLS such as: https://hudoc.echr.coe.int/#{%22documentcollectionid2%22:[%22GRANDCHAMBER%22,%22CHAMBER%22],%22itemid%22:[%22001-230857%22]} Fortunately, most pages list a "clean" URL that also works: https://hudoc.echr.coe.int/?i=001-230857 https://hudoc.echr.coe.int/?i=001-230857
- elzbardico 3y agoDjango URLs was probably one of the points that made us use it when we finally decided to ditch Vignette around 2007
- thih9 3y agoThe “.html” is a bit ugly though - it exposes the internals, tying the url to something that might change. It’s not much harder to hide it; E.g. for static files, create a directory and put an index.html there.
- mcny 3y agoI agree with you but Facebook disagrees with us. https://m.facebook.com/story.php/?id={redacted}&story_fbid={redacted}
- tithe 3y ago+1 though for not having "cgi-bin/".
- gpvos 3y agoThe item itself is an HTML page. That is extremely unlikely to change, very unlike an extension like .php or .asp .
- apitman 3y agoWhat if they wanted to start offering raw markdown with content negotiation instead of HTML?
- KptMarchewa 3y agoServe it as .html endpoint too. It's pure syntax
- account42 3y agoUnlikely to change over what timeframe? Image formats on the web have moved from .gif to .jpeg/.png to .webp to .avif. Video and audio formats have always been a mess. For a time it seemed things would move to .xhtml. That the page is sent to your browser as HTML is not a defining attribute and could very well depend on HTTP content negotiation.
- u320 3y agoAnd that's before Google analytics throws a bit of its own trash on there as well.
- flgstnd 3y agomicrosoft teams is a good example of ugly urls. it could be a just a couple of letters that are mapped in a backend database but the urls feel like there is a whole javascipt file encoded in there
- spcebar 3y agoI think it's a specific reference to one of the tenets of Cool URIs Don't Change, which was that you should drop the file extension from URIs. So, indeed, not that ugly, but also, not cool, according to the good people of the W3C, back in the day.
- remram 3y agoI've put blobs of JSON in a URL before. It was dirty but I thought it was better than having pages with no direct URLs or breaking the browser's history.