Protocol Relative URLs

As I was developing an audio player and creating its embed code, I learned that you can use 2 forward slashes as a shorthand whether a file could be loaded from either an http or https protocol. This shorthand is commonly known as protocol relative URLs.

The browser appends the right protocol in front of the URL.

For example,

//example.com/mycss.css

As I was telling earlier, it would prepend the right protocol into this https://example.com/mycss.css

So next time, if you want to load up a URL but not quite sure as to what protocol to use, you can just simply use the shorthand — 2 forward slashes.