I need to load the jQuery UI files, and would like to do it from Google. Currently I upload:
<script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script> <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.draggable.js"></script> <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.droppable.js"></script>
What are the corresponding files I need from Google?
Can I use http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js?
Also, is there any disadvantage in using this one instead: http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js ?
Google provides CDN support for jQuery via the googleapis.com domain. The latest version of Google CDN provides four different types of jQuery versions- normal (uncompressed), minified, slim, and slim & minified. Google CDN provides the jQuery via ajax.googleapis.com domain.
The Google AJAX API loader makes it easier to use multiple Google AJAX APIs on the same page and unifies the namespaces across them. Instead of adding a separate script tag for each API, this loader gives you a common way to load multiple APIs at once.
Steve Souders' book High Performance Web Sites recommends putting scripts at the bottom, before the </body> tag.
The Google Hosted Libraries is a stable, reliable, high-speed, globally available content distribution network for the most popular, open-source JavaScript libraries. Google works directly with the key stakeholders for each library effort and accepts the latest versions as they are released.
Yep. It's as simple as that.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"></script>
You could use Google's loader to load it but you don't really need to.
The only real disadvantage to using the min one is that the code is compressed so if you wanted to step through it with a debugger, it would be quite difficult to say the least. The advantages far outweigh this though. In production, I would say by all means use the min one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With