Ya learn something new every day. Although I didn’t think so, and it plays hell with some HTML WYSIWYGs and link checkers, the following is a valid src and also works with href:

<samp>
&lt;img src="//www.example.com/logo.gif" /&gt;
</samp>

When on a non-https site, it loads the image from http://www.example.com/logo.gif. On an https secure site, it loads the image from https://www.example.com/logo.gif. Essentially, // means use the scheme part of the URI that is currently in use.

See more posts about: www | All Categories