Using a protocol-independent absolute path
Snippet
Written with a loving hand by kitt some time around 22:21 on 13 November 2010
If the browser is viewing an page in SSL through HTTPS, then it’ll request that asset with the https protocol, otherwise it’ll request it with HTTP.
<img src="//domain.com/img/logo.png"/>
Use the // ignoring the protocol.
Add new comment