I noticed CDNs use //
in the beginning of the source of the script.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
This doesn't work locally (obviously), so I add http:
before //
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
So... why do they put //
in the beginning instead of http://
? what is the significance? Is it some sort of DNS prefetch?
Also, is the //
useless if the script element is at the bottom of the page?
https://developer.mozilla.org/en-US/docs/Web/HTTP/Controlling_DNS_prefetching