Google or Self-hosted: Which jQuery Library is Best for You?

Whether you're new to jQuery or are simply reevaluating the way you use it, it's worth looking into the most practical way to load it onto your website. Up until a few years ago, the only option was to upload a copy into each website's directory.

Now, a myriad of web-hosted options are available, the most popular of which is Google Libraries API, a content distribution network for common JavaScript libraries, including jQuery. Of these two options, which is the best solution for your development needs? The best way to answer this question is to take a look at some of their features side-by-side.

Please go to the inner post-page for full questions & answers to choose the best jQuery solution. Or read more other posts:

- Awesome and Advance JavaScript Tutorials
- Reuse JavaScript codes as jQuery Plugins: Tutorials and Examples
- 5 Good JavaScript Habits for Better Improvement


Sampled by © JavaScriptBank.com

Google or Self-hosted: Which jQuery Library is Best for You?

Whether you're new to jQuery or are simply reevaluating the way you use it, it's worth looking into the most practical way to load it onto your website. Up until a few years ago, the only option was to upload a copy into each website's directory. Now, a myriad of web-hosted options are available, the most popular of which is Google Libraries API, a content distribution network for common JavaScript libraries, including jQuery. Of these two options, which is the best solution for your development needs? The best way to answer this question is to take a look at some of their features side-by-side:

1) How long much time is consumed by script downloads?

Google Libraries API:
Because the script request is made on a different server, script download (it it's even necessary; see below) would take place in parallel with your server scripts.

Self-hosted:
Runs on the same server as your website, so it loads in succession with other scripts, adding to overall download time.

2) How does it utilize the user's cache?

Google Libraries API:
Since so many websites utilize this library, it's very likely that the user already has this file in their cache and won't need to download it again when they visit your site, speeding up load time.

Self-hosted:
Located in one place: your server. Download times are affected by the user's proximity to your server.

3) Which server delivers the code?

Google Libraries API:
Circulates your static code across a broad range of servers worldwide using a Content Delivery Network (CDN), thereby minimizing download times by automatically choosing the server closest to the user.

Self-hosted:
Located in one place: your server. Download times are affected by the user's proximity to your server.

4) Can I customize the script?

Google Libraries API: No.

Self-hosted: Yes.

5) How much control do I have over security?

Google Libraries API:
None; if someone hacks into Google, the script running on your site could be at risk. However, we're talking about Google here. The likelihood of their well-financed security getting hacked is slim. Also, if Google goes down, your script will go down as well; but again, this is a very rare occurrence.

Self-hosted:
Complete; if you want to control the level of security, you will have to use your own. However, keep in mind that any server is prone to attack or downtime, and you'll likely have to invest highly in a system more secure than Google's.

Conclusion

As you can see, for most cases, the Google-hosted jQuery library is a better, faster option. However, if you wish to monitor your own security, or the site will be used within an intranet system, a self-hosted library would probably work better for you.

Mandy Barrington is the lead web designer at RYP Marketing, a Tampa web design agency focused on increasing ROI in online marketing. You can find more tips and advice on the RYP Marketing blog.

Language
Translate this page to English Translate this page to French Translate this page to Vietnamese

Recent articles
How to open a car sharing service
Vue developer as a vital part of every software team
Vue.js developers: hire them, use them and get ahead of the competition
3 Reasons Why Java is so Popular
Migrate to Angular: why and how you should do it
The Possible Working Methods of Python Ideology
JavaScript Research Paper: 6 Writing Tips to Craft a Masterpiece
Learning How to Make Use of New Marketing Trends
5 Important Elements of an E-commerce Website
How To Create A Successful Prototype For Your PCB


Top view articles
Top 10 Beautiful Christmas Countdown Timers
Adding JavaScript to WordPress Effectively with JavaScript Localization feature
65 Free JavaScript Photo Gallery Solutions
16 Free Code Syntax Highlighters by Javascript For Better Programming
Best Free Linux Web Programming Editors
Top 10 Best JavaScript eBooks that Beginners should Learn
Top 50 Most Addictive and Popular Facebook mini games
More 30 Excellent JavaScript/AJAX based Photo Galleries to Boost your Sites
Top 10 Free Web Chat box Plug-ins and Add-ons
The Ultimate JavaScript Tutorial in Web Design


Free JavaScript Tutorials & Articles
at www.JavaScriptBank.com