Open Macenstine opened 4 years ago
Using // will use whatever protocol the site that is loading the script is using. For example, if a site uses HTTPS, it will load https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
and it if uses HTTP, it will load http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
.
This stumped me for a good hour. The jQuery CDN link in the documentation goes nowhere because it's incomplete:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
The correct link should be:<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>