Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anyone in the enterprise using Google-hosted jQuery script?

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.

like image 924
frankadelic Avatar asked Mar 02 '10 01:03

frankadelic


People also ask

Is it better to download jQuery or use a CDN?

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.

Does Google use jQuery?

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.

Does everyone use jQuery?

jQuery is used on 85.03% of desktop sites, and 83.46% of mobile sites. React is used on 4.6% of desktop sites.

What is Google CDN jQuery?

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.


1 Answers

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)

like image 168
karim79 Avatar answered Jan 16 '23 23:01

karim79