So, consider a protocol-relative URL , for example:
The idea that I had in my head as long as I remember is that the relative protocol URLs are actually absolute URLs. They behave exactly like absolute URLs, and never work as relative URLs. I would not expect this to make the browser find something in
http://www.example.com///www.example.com/file.jpg
The URL defines the host and the path (for example, an absolute URL), and the scheme is inherited from any page used, and therefore it makes a complete unambiguous URL, i.e. absolute url.
Right?
Now, after further research on this, I came to this answer , which says:
A URL is called an absolute URL if it starts with a scheme and a specific scheme (here //after http:). Everything else is a relative URL.
Neither the question nor the answer specifically discusses the relative URLs of the protocol, so I remember that it might just be an oversight in the wording.
However, now I now have a problem in my development, when a system that accepts only absolute URLs does not work with protocol-related URLs, and I don’t know if this is by design or because of an error.
the RFC3986 section , which is often associated with protocol-related URLs, also splashes the word "relative" around a large number. 4.3 it follows that absolute URIs define a scheme.
:
URL- ?