Links without http: like // code.jquery.com / etc

Recently, I noticed that some sites (such as jsFiddle ) and some widgets, such as a scroll feed widget and many others.

They started using links in the format

  • //code.jquery.com/jquery-1.9.1.js
  • //assets.pinterest.com/js/pinit.js

    • What does it mean //?
    • Is it the same as http?
    • If it //matches http, why use it instead of http?
    • If both options are different, can I use it to link to my site?

as an addition: I'm not sure, but I think it seems to be used //name:sub.domaine.com, am I wrong? if they exist, what do they mean?

Edit:

as explained in the answer below, I can use the notation //to make my links shorter, but when I use it for my site: Chrome changes the link to: file:///which is not what I expected

+5
source share
2 answers

This is the protocol related URL. If HTTP is used on the page that includes, then this is HTTP. If the page that includes uses HTTPS, then it uses HTTPS.

, , ( " ", ), SSL/TLS .

, URL-, /, , URL- / .

+8

: - [http://www]. , , URL, [http://www.] //

-4

All Articles