I would like to use Google's copy of jQuery, to spare some load on my company's local web servers:
http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js
While this is great for many sites (include stackoverflow and my personal website), I am hesitant to introduce this change to my company's public website.
Personally, I trust Google in this regard, but it would be easier to convince management if some other major companies had taken the leap already.
Anyone know of major enterprise companies who use google-hosted jQuery (or other JS libraries)? Something in the league of Oracle, IBM, etc.
jQuery CDN generates functioning code that works in various browsers in a shorter time. On the other hand, Web developers require the jQuery download file to parse the library. Raw JavaScript may be faster for some processes, but the advantages of jQuery UI CDN outweigh the disadvantages.
No, Google certainly does not use jQuery—it is all vanilla JavaScript and (sometimes) Closure Library. As for inlining, if JS/CSS is relatively small, it is faster to inline it to minimize the number of HTTP requests. Google Page Speed Online can give you some tips on how to optimize your page.
jQuery is used on 85.03% of desktop sites, and 83.46% of mobile sites. React is used on 4.6% of desktop sites.
Projects In JavaScript & JQueryGoogle 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.
I don't entirely see why such a decision should be impacted by whether or not huge enterprises such as IBM use Google's CDN. What you should do, is explain the performance and bandwidth-saving potential of doing so, and at the same time present them with a plan B:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script>
if (typeof jQuery == 'undefined') {
document.write('<script src="', 'js/jquery-1.4.1.min.js', '" type="text/JavaScript"><\/script>');
}
</script>
(the above code was taken from this page)
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