开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜