Making Websites Small
There are a few more things that help:- Reducing DNS calls and server round trips. Loading fewer resources from fewer domains makes a huge difference. Using server push also helps, although it might get deprecated.- Responsive images. Load small images on small displays. Don't load 2x images on lower density displays.- Using the right load event for JavaScript. load fires long after DOMContentLoaded on some pages, especially on slow connections.- Setting the size of elements before they load, to prevent the content from jumping all over the place.- Loading fewer fonts, and serving them yourself. Google Fonts is significantly slower.- Gzipping everything you send. It makes a significant difference on slow connections.- Static caching. This will shave whole seconds off your page load time. Cache both on the server and in the browser, but mostly on the server.- Consider perceived performance too. It doesn't matter how fast you force a coercive cookie notice on your readers.- Performance extends to the content of the page. Don't make users chase answers. Give clear, concise information and use typography to guide your users to it.