Safari seems to be the only browser that differently handles URL's that have three slashes after the scheme.
For example typing https:///google.com in the address bar results in the URL being converted to https://google.com by all browsers I tried (Edge, Firefox, Opera, Tor), excepting for Safari, which converts the URL to https://localhost/google.com.
The conversion also happens when receiving a HTTP redirect (301 or 302) with a "malformed" URL, but doesn't happen when clicking on a link, in that case Safari is consistent with the other browsers.
Does somebody know why is that? And who's correct - Safari inserting localhost
, or the other browsers stripping out the third slash?
https://google.com
. What happens in the address bar is not specced though, so nobody is wrong./
afterprotocol://
, just like they do with<a href="url">
. You may want to add an issue to their tracker. If it helps, I made a repro-case here.