0

I noticed that the script Twitter uses to load widget.js on your page detects for the protocol and not use Protocol-relatiave URL

var p = /^http:/.test(d.location) ? 'http' : 'https';
js.src = p + '://www.twitter.com/widget.js';

instead of

js.src = '//www.twitter.com/widget.js';

Is there any reason why you should do that? Maybe backwards compatibility?

Ryan Her
  • 1,067
  • 1
  • 9
  • 14

0 Answers0