在一些网站会看到用 // 开头取代用 http:// 或 https:// 开头。
像是 flickr 的内嵌分享连结就是用 //embedr.filckr.com/xxxx.js
google 也建议使用这样的语法,原因是因为网站可能改用 http 或 https 。
https://google.github.io/styleguide/htmlcssguide.xml#Protocol
这种写法的接受度如何?
我的 firefox 44 还 45 认不出来......,
会去找根目录上的档案;当然是找不到啦。
windows XP 上不再被支援的 chrome 也不支援。
====================================================
题外话,
其实是在查 URL 中用来指明协议开头的双斜线
有什么意义时无意间看到的。
而伯纳李 ( Berners-Lee ) 也为这件事公开道歉了 XD
http://www.sitepoint.com/sir-tim-berners-lee-http-slashes/
在这串 slackoverflow 有人引用了他的看法:
http://superuser.com/questions/465565/in-a-url-what-is-for
大意是双斜线有引人注目的作用;
就像看到 @ 会直觉想到 email ,看到 // 会想到 URL 。
但单斜线也可以啊!