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=""></script>

Open in new window

KV DAsked:
Who is Participating?
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.
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.
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...
Ensure Business Longevity with As-A-Service

Using the as-a-service approach for your business model allows you to grow your revenue stream with new practice areas, without forcing you to part ways with existing clients just because they don’t fit the mold of your new service offerings.

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.
Mukesh YadavFull Stack DeveloperCommented:
One more thing you can remove the  type="text/javascript" attribute from script element this is not required.
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

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...
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

From novice to tech pro — start learning today.