Thursday, April 11, 2013

The Protocol-Relative URL: “//domain.com”

Paul Irish (via Jonathan Rentzsch):

If the browser is viewing that current page in through HTTPS, then it’ll request that asset with the HTTPS protocol, otherwise it’ll typically request it with HTTP. This prevents that awful “This Page Contains Both Secure and Non-Secure Items” error message in IE, keeping all your asset requests within the same protocol.

Comments RSS · Twitter

Leave a Comment