phunehehe
phunehehe

Reputation: 8778

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 "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?

Upvotes: 0

Views: 104

Answers (1)

jcoder
jcoder

Reputation: 30035

It will default to http or https depending on how the main page is loaded and not give mismatch errors.

Upvotes: 2

Related Questions