General Guidelines
This section has some guidelines related to jQuery UI, jQuery, and JavaScript in general . Let's go through them one by one.
Using a CDN
Instead of serving the jQuery UI library .js
file and its theme's CSS file from your web server, it is better to use a Content Delivery Network (CDN). Using a CDN makes loading of web pages faster. This is because browsers cache .js
files. Hence, if you have referenced a jQuery UI file from CDN, if it is found in the browser's cache from some earlier visit to a website, the browser will not load the file again. If you are using multiple libraries on a page, it can have a significant effect on reducing page-load time. Another advantage is that since these files are referenced from external domains, the browser will be able to make multiple requests to load the files.
Here are the three popular and commonly used CDNs' for loading jQuery and jQuery UI files, along with their different versions:
- jQuery CDN: https://code...