Performance == WIP. ## Glossary - **Critical Rendering Path** - - `requestAnimationFrame` ## General Strategies 1. Minimize Bytes. 1. Reduce critical resources. 1. Reduce CRP length. TODO: Explain what CRP length is. ## Loading - Minify, Compress, Cache assets. - Browsers have a [preloader](https://andydavies.me/blog/2013/10/22/how-the-browser-pre-loader-makes-pages-load-faster/) to load assets ahead of time. ## Rendering - Remove whitespace and comments from HTML/CSS/JS file via minification. - CSS - CSS blocks rendering AND JavaScript execution. - Split up CSS for fewer rendering blocking CSS stylesheets by using media attributes. - Download only the necessary CSS before the browser can start to render. - https://developers.google.com/web/fundamentals/design-and-ui/responsive/#css-media-queries - Use Simpler selectors. - JavaScript - JS blocks HTML parsing. If the script is external, it will have to be downloaded first. This incurs latency in network and execution. - Shift `