代码之家  ›  专栏  ›  技术社区  ›  deathangel908

没有协议的URL与简单的URL有何不同?

  •  0
  • deathangel908  · 技术社区  · 6 年前

    我经常看到人们使用像下面这样的网址来获取cdn资源。

     <script src="//site.domain.com"></script> 
    

    我想知道浏览器的不同之处,如果它被指定为 https://site.domain.com

    1 回复  |  直到 6 年前
        1
  •  1
  •   Vincent LE GARREC    6 年前

    意思是“保持与实际文件相同的方案”。

    shorthand http:// as // for script and link tags? anyone see / use this before?

    更新 正确的链接。