Why is the JS code for Facebook's like button using a weird URL?
Looking at the code generated by the developers page, I'm talking about this line:
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
It's such a weird URL, isn't it? I mean, the开发者_如何学C "right" way would be
js.src = "http://connect.facebook.net/en_US/all.js#xfbml=1";
Is there any benefit of omitting http:
? Is it even a valid URL?
It will default to http or https depending on how the main page is loaded and not give mismatch errors.
精彩评论