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?
A double slash in the URL path is valid and will respond in the browser, but is typically unwelcome, as this could cause duplicate content issues if the CMS delivers the same content on two URLs (i.e. single slash and double slash).
If the double slash in the page's permalink is generated by your CMS, you might need to address your developer for help. If the URL with a double slash is indexed in Google or has incoming external links, you can set the proper 301 redirects to the corrected URL.
I'm asking what does mean of first two slashes? file:// or http:// ? @LetDoit - those are the characters chosen as the designated separator when drafting the rfc for uri format.
The "two forward slashes" are a common shorthand for "request the referenced resource using whatever protocol is being used to load the current page".
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 to http://example.com/1.png
. If I'm on https://example.org
, it goes to https://example.com/1.png
.
This lets you easily avoid mixed content security errors.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With