43. Foundations:
1. Reduce http requests
2. Gzip components
3. Minify JS and CSS
4. Optimize images
5. CSS at the top
44. Foundations:
1. Reduce http requests
2. Gzip components
3. Minify JS and CSS
4. Optimize images
5. CSS at the top
6. JS at the bottom or async
45. Foundations:
1. Reduce http requests
2. Gzip components
3. Minify JS and CSS
4. Optimize images
5. CSS at the top
6. JS at the bottom or async
7. Use CDN
60. Font serving
● Choose fallback font wisely
● Prepare for failure - style fallback font
● Don’t block rendering
● Minimize FOUT
● Store Base64 encoded font in local storage
61. Font serving
/** Pseudocode **/
if (fonts_in_localStorage) {
inject cached Font style sheet
} else {
// Don't block the loading of the page;
on(window, "load", function() {
load webfont.css
store fonts_in_localStorage
});
}
Script: https://gist.github.com/