More and more, began to notice that the links in the source code on Web sites begin with two slashes. For example:
<a href="//example.com/1.png">Image</a>
Why do it?
More and more, began to notice that the links in the source code on Web sites begin with two slashes. For example:
<a href="//example.com/1.png">Image</a>
Why do it?
Copyright © 2021 Jogjafile Inc.
It's a protocol-relative URL (typically HTTP or HTTPS). So if I'm on
http://example.org
and I link (or include an image, script, etc.) to//example.com/1.png
, it goes tohttp://example.com/1.png
. If I'm onhttps://example.org
, it goes tohttps://example.com/1.png
.This lets you easily avoid mixed content security errors.