Hacker News new | ask | show | jobs
by thaddeusmt 4493 days 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-rep...

1 comments

My bad. I tested it by loading a page from the local filesystem rather than over the network. It works fine as is, of course.