4 ms·
I love last.fm but never understood the URL structure naming convention. Why use a "+" instead of a "-" for every band page (e.g. https://www.last.fm/music/The+
by smurda 4mo ago
I love last.fm but never understood the URL structure naming convention. Why use a "+" instead of a "-" for every band page (e.g. https://www.last.fm/music/The+Beatles https://www.last.fm/music/The+Beatles).
I thought Kebab-case is usually the norm, and I don't think I've seen the "+" in any other URL paths that aren't query strings. Any ideas why they formatted it like this?
- zimpenfish 4mo agoI believe "+" is the URL encoding for space and they're just putting the band names into the URL before encoding (thus "The Beatles" -> "The+Beatles")
- kubanczyk 4mo agoI've checked RFC 1738 and it's not the case. The only standard for "+" is: > (RFC 1866) specifies that space characters should be encoded as `+` in application/x-www-form-urlencoded content-type key-value pairs (see paragraph 8.2.1, subparagraph 1). From https://stackoverflow.com/a/40292770 https://stackoverflow.com/a/40292770
- zimpenfish 4mo agoRFC1738 is obsolete. RFC1866, referenced in that SO answer, is also obsolete. But none of that matters, particularly, because lastfm are consuming the URLs, they know full well what "+" means in a URL submitted to their servers, and also they've been around for decades (well before the whole "use %20 instead") - why on earth would they change up their URL scheme when it's working fine?
- kevinsync 4mo agoI suspect it was an intentional choice so that artist names like Jay-Z remain properly separated in the URL, especially in cases of multiple-artist billings (ex. https://www.last.fm/music/Nas+&+Jay-Z https://www.last.fm/music/Nas+&+Jay-Z)
- herewulf 4mo agoThe "-" character appears pretty frequently in song/album titles, maybe even artist names. There could be some sense in not using it as a substitute for space in this context.