Network-Path Reference URI / Scheme relative URLs

//example.com/img.png is a perfectly valid URI syntax as per RFC 3986: Section 4.2.

It is relative to the current scheme, and therefore as you mentioned, it can be very useful when switching between HTTP and HTTPS, because you won’t need to explicitly specify the scheme.

All modern browsers will understand that format, including IE 6.

Further reading on Stack Overflow:

Leave a Comment