I found lots of sites using <a href='//foo.com'>
instead of <a href='http://foo.com'>
Is there any difference?
What are the benefits?
When using //
instead of http://
, is it possible to direct them to https://
?
I found lots of sites using <a href='//foo.com'>
instead of <a href='http://foo.com'>
Is there any difference?
What are the benefits?
When using //
instead of http://
, is it possible to direct them to https://
?
It is a protocol-relative URL. Every URL such as this inherits parent document's protocol (HTTP or HTTPS). Useful if you want to serve both versions of webpage.