Using CDNs

Instead of serving all of the JavaScript and CSS files of the third-party libraries from your web server, you should consider using a Content Delivery Network (CDN). Using a CDN to serve the static files of the libraries that are used by your website can make it load faster since:

  • CDNs have high speed connections and several caching levels.
  • CDNs have many geographically distributed servers that can deliver the requested files faster since they are closer to the end user.
  • CDNs help parallelize resource requests, since most browsers can only download up to four resources concurrently from any specific domain.

Moreover, if a user has static resources cached from a previous visit to another website that uses the same CDN, he or she will not ...

Get jQuery Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.