3 ms·
This is a common pattern for embedding scripts, so the browser will use the same protocol as the parent page loading the element (http or https), avoiding issue
by thaddeusmt 13y ago
This is a common pattern for embedding scripts, so the browser will use the same protocol as the parent page loading the element (http or https), avoiding issues with embedding insecure content in a secure page. I thought it worked for iframe elements too - but I guess it's not consistently supported? It works for me in Chrome on Win7.
Edit - more info about "Protocol Relative URLs": http://stackoverflow.com/questions/550038/is-it-valid-to-replace-http-with-in-a-script-src-http http://stackoverflow.com/questions/550038/is-it-valid-to-rep...
- leephillips 13y agoMy bad. I tested it by loading a page from the local filesystem rather than over the network. It works fine as is, of course.