Is it legal (and good practice and well supported) to omit the authority component from a URL (usually a host name), but specify a scheme (usually http: or https: ?
For example, are these valid URLs?
https:login.html (relative hostname and path) https:/auth/login.html (relative hostname, absolute path)
The expected behavior, of course, will be to use the current host name - the path (relative).
(BTW, this assumes // after this scheme is part of the authority (host) component, I think this is the correct intuition)
Motivation is a general requirement that some pages of a website be accessible via https and others via http, and we would like to use relative URLs instead of an absolute one (for testing in different environments).
source share