What is the advantage of using protocol less URL while referencing jQuery from CDNs?

Technology CommunityCategory: jQueryWhat is the advantage of using protocol less URL while referencing jQuery from CDNs?
VietMX Staff asked 3 years ago

It is quite useful when you are moving from HTTP to HTTPS url. You need to make sure that correct protocol is used for referencing jQuery library as pages served via SSL should contain no references to content served through unencrypted connections.

“protocol-less” URL is the best way to reference third party content that’s available via both HTTP and HTTPS. When a URL’s protocol is omitted, the browser uses the underlying document’s protocol instead.