4 ms·
I do parse it that way. My position is that it's not the proper form for the function. Note that both trailing slash variant examples you have provided (HN and
by aflukasz 2y ago
I do parse it that way. My position is that it's not the proper form for the function.
Note that both trailing slash variant examples you have provided (HN and Google) do redirect to non slash ones.
In fact, personally, I don't expect leading slashes for main pages.
- nayuki 2y ago>> "https://news.ycombinator.com/ https://news.ycombinator.com/" or "https://google.com/ https://google.com/" > both trailing slash variant examples you have provided (HN and Google) do redirect to non slash ones This is incorrect. Chrome (and Firefox by default?) have the broken behavior of showing bare URLs like "google.com" or even "https://google.com https://google.com". But this is absolutely wrong according to the URL spec and HTTP spec. After all, even if you want to visit "https://google.com https://google.com", the first line that your browser sends is "GET / HTTP/1.1". Notice the slash there - it is mandatory, as you cannot request a blank path. Things were better in the old days when browsers didn't mess around with reformatting URLs for display to make them "look" human-friendly. I don't want "www." implicitly stripped away. I don't want the protocol stripped away. I don't want the domain name to be in black but the rest of the text to be in light gray. I just want honest, literal URLs. In Firefox, this can be accomplished by setting: browser.urlbar.formatting.enabled = false; browser.urlbar.trimURLs = false.