using javascript from a hosted library

I am using a progress bar on my page that uses javascript from a hosted library link copied below.

Is it a reliable practice?

What if this site stops hosting this library? Can I host the code locally?
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

Open in new window


Thanks.
KV DAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

zephyr_hex (Megan)DeveloperCommented:
Yes, you can host it locally.  Just download it to your server and change the src to your local directory that's relative to the page.

And that is a reliable site for hosted resources, but that version of jQuery is on the older side, so it's entirely possible it would get removed at some point.
0
Julian HansenCommented:
What if this site stops hosting this library?
Then half the sites on the web will stop working. CDN's (Content Delivery Networks) are stock standard and used ubiquitously throughout the web - not only is it safe - it is good practice in many cases.

The CDN you quoted is Google and the library is jQuery - can't get more solid than that.
1
HainKurtSr. System AnalystCommented:
I guess other than that, it reduces network traffic on your web site :) which is a good thing...
especially your server is slow, bandwidth is limited and you pay for outbound traffic...
1
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Julian HansenCommented:
One of the main reasons against hosting the script yourself is page load time. Typically browsers limit resource downloads to 2 per domain. That means if you are loading a large number of resources from your site only 2 are being downloaded at any one time. By moving resources off to other domains you increase the number of simultaneous connections and so bring down your page load time.

The number of resources can be reduced with packing as well - so usually a combination of the two strategies gives the best results.
0
Mukesh YadavFull Stack DeveloperCommented:
One more thing you can remove the  type="text/javascript" attribute from script element this is not required.
1
NicholasCommented:
Typically browsers limit resource downloads to 2 per domain
This isn't the eighties


The main advantage of using a well known CDN is that the chance of your visitor already having download the resource is high so they don't have to download it again (within the refresh timeframe) meaning faster page loads for you and in the day and age of mobile usage less bandwidth for your visitor
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HainKurtSr. System AnalystCommented:
everything said here adds something valuable...
1
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.