On my Windows 10 machine I can enter a file URL of a local directory (e.g.
file:///D:/temp), or a local file (e.g.
file:///D:/temp/homepage.html) and everything works fine.
However, wherever there is a forward slash in those valid URLs, I can insert many more, and everything still works fine. For example:
Also see the screenshot from Chrome:
At first I thought this was a bug in Chrome, but Opera, Edge and Firefox also do the same thing so I assume that the URL is perfectly valid.
As a related issue, it's worth noting that those browsers also allow multiple slashes in a web URL (e.g.
https:///////////////////www.amazon.com), though in that scenario the URL in the address bar gets corrected to
https://www.amazon.com. So it's not just file URLs that allow many slashes.
Is there a good reason for the browsers allowing all those slashes, or is it an oversight in some specification that can't be corrected?