Why do browsers add a trailing slash to the website’s URL when you copy-paste the full URL in the address bar? https://foo․com → https://foo․com/
-
-
Replying to @simevidas
URL canonicalisation (there always must be a path part).
1 reply 0 retweets 0 likes -
Replying to @RReverser
It’s not optional? https://url.spec.whatwg.org/#scheme-relative-special-url-string … “optionally followed by a path-absolute-URL string”
2 replies 0 retweets 0 likes
Replying to @simevidas @RReverser
There’s a difference between URL parsing (which must support all kinds of funky input) and what constitutes a normalized URL (which must include a path). To normalize programmatically: new URL(url).toString();
10:02 AM - 19 Jan 2019
0 replies
0 retweets
3 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.