Chapter 10. Fine-tuning asset delivery
This chapter covers
- Understanding compression basics, the impacts of poor compression configuration, and the new Brotli compression algorithm
- Using caching to improve the performance of your website for repeat visitors
- Exploring the benefits of CDN-hosted assets
- Verifying the integrity of CDN resources by using Subresource Integrity
In this chapter, we’ll spend time investigating the effects of compression, both for good and ill, as well as a new compression algorithm named Brotli. We’ll also touch on the importance of caching assets, an optimal caching plan for your website, and how to invalidate stubborn caches when you update your content or release new code.
Moving away from web server configuration, we’ll learn how your website can benefit from using assets hosted on Content Delivery Networks (CDNs), which are geographically dispersed servers. You’ll also learn how to fall back to locally hosted assets in the unlikely event that a CDN fails, and how to verify the integrity of CDN assets using Subresource Integrity.