1
我看到這樣的腳本在第三方網站上包含了所有的時間,這些天,例如,對於谷歌地圖API://當包括第三方的JavaScript庫
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&sensor=false"></script>
這是什麼前綴'//'是什麼意思?它使用用戶正在運行的任何協議(http,https)?
看看這些問題:http://stackoverflow.com/questions/6785442/browser-support-for-urls-beginning-with-double-slash,http://stackoverflow.com/questions/6350244/double-slash- slash-at-beginning-of-javascript-include,http://stackoverflow.com/questions/9646407/two-forward-slashes-in-a-url-src-href-attribute –