Once you find a library and decide you want to use it, you need to make a decision, do you download and install the library on your own server or do you just link to the hosted library? Your answer will depend on a variety of issues.
Libraries that are hosted elsewhere are handy, there are no files to install and a simple line of script can bring you all the functionality you’d want without you having to architect the file structure on your own servers. To load a hosted library, copy and paste the code snippet for that library (shown below) in your web page. For instance, to load jQuery, embed the
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> snippet in the <head> tag of your HTML page.
Additionally, the hosts of the library you’d like to use might not appreciate the additional server load that is created when you link to their libraries. Always read the documentation for instructions how best to use their library. In these cases, you should consider downloading the library to run from your own server. But where do you put it once you have it on your local machine?
Most library documentation is helpful and includes instructions on how to download, but if you happen upon one that does not, these basic instructions apply:
1. Download the entire library to your local machine.
That’s it. The library is now available for you to use on any page on your site.