A key design facet of jQuery Tools, as outlined by Yahoo's five rules of best practice, is that designers should try to reduce the number of images, stylesheets, and scripts that have to be downloaded. Yahoo argues that this is the key to improving the speed of your site, as most of the time spent looking at a site is from the front-end. The five rules created by Yahoo!, and to which jQuery Tools adheres, are:
If you include the following script link in your code, you will be able to respect these five rules:
<script src="http://cdn.jquerytools.org/1.2.6/jquery.tools.min.js"> </script>
They can help to improve the performance of your site significantly and improve your website performance roughly by 70 to 80 percent! You are encouraged to use the CDN links that are made available, especially for production use; if you are concerned about the file size you should download a combined script that contains only those tools that you really need and follow the principles that are mentioned in this chapter.
A good practice is to minimize the number of separate JavaScript or CSS files used in a site—this helps to reduce the amount of time taken to fetch content from different sources. This is allowed for within jQuery Tools, which uses one combined JavaScript file when either downloading a custom build of the library, or using the CDN links.
There are a number of CDN links that are available for use—using these can result in a 15 to 20 percent increase in efficiency, in comparison to using manual, static links.
JQuery Tools are built with expires
headers set on all of the tools, which makes them cacheable; this will reduce subsequent response times from each visit to a site by as much as 50 percent.
If gzipping has been enabled on a server, then this can help cut file sizes by as much as 65 percent; most modern browsers claim to be able to handle gzipping, when it has been enabled on a server. All jQuery Tools downloads available through the CDN links are gzipped, to help reduce download times.