These days if your website doesn’t contain jQuery then people might start disliking you for no reason. You better believe it and get on board, yes jQuery is the next big thing and it has been for quite a while, I might add. So, if you’re wondering how can I get started, then you should probably head over to jQuery site and go through the documentation and familiarize yourself with the API.
What I want to go over here is the two different approaches you could take in referencing jQuery libraries in your project. The first approach and the one that I used to take was downloading the jQuery package that I need, insert it in my project and then refer to it from my pages like so:
This one is simple and we all should be familiar with it as a web developer, but keep in mind that this requires your server hosting all the required files and if you want to switch over to another theme or to a newer version down the road, then you will have to delete all of your old files, download the new files, unpack the files and put them in your project, basically a lot of steps to follow.
Now lets talk about the other method of using jQuery and that is by using CDN (Content Delivery Network) which are hosted on a bunch of servers around the globe just for you to use.
You can choose from either using Google CDN or Microsoft CDN, they both host pretty much all of the jQuery libraries including the UI Themes. Some of the benefits of choosing CDN is that your project will be leaner and meaner (faster), your pages no longer has to load all the scripts and css file in the cache every time someone visits it, and you can rest assured that your site will always have access to those libraries.
So, if you’re still not convinced then I suggest you do some more research and choose the path that makes the most sense and stop following the old programmer saying “as long as it works”, rather think of the science that goes behind it.


Leave a comment