Recently, I wrote a blog post about Ada URL parser version 2.0.0. In that post, I mentioned that the parser is fully compatible with the URL parser specification, passes all Web Platform Tests and currently used in Node.js 20.0.0.
A couple of days ago, I noticed a big difference in how URLs were handled by Ada, Safari, Chrome, and Firefox. It got me thinking that it would be a good idea to explain why these differences occur and how different browsers handle URL parsing in their own unique ways, which leads to inconsistencies and compatibility issues. In this blog post, I'll break down these variations and shed light on why URLs may not always work the same way across different browsers.
Disclosure: In the context of this blog post, I will be focusing on WHATWG URL specification, and not RFC 3986 or RFC 3987, even though historically it was written a lot earlier than the WHATWG.
RFC 3986, also known as the Uniform Resource Identifier (URI): Generic Syntax provides its own set of rules and guidelines for working with URLs.