3 ms·
Expanding on a list of techniques taken from another HN post ( https://news.ycombinator.com/item?id=41883893 https://news.ycombinator.com/item?id=41883893 ): -
by epistasis 2y ago
Expanding on a list of techniques taken from another HN post ( https://news.ycombinator.com/item?id=41883893 https://news.ycombinator.com/item?id=41883893 ):
- Server delivers HTML, not JSON
- Pre-loading product page HTML on hover
- Properly enabling caching on the CDN
- Using service worker caching
- Using ASP.net
- DNS pre-fetching entries for other image and web domains
- Pre-loading fonts that CSS will later load, as well as some images
- Critical CSS inline: put the structural CSS for layout in <header> in a style tag inline, without fetching anything
- Assign fixed pixel width and height to image to improve layout speed (this technique goes back to the 1990s!)
- Javascript delivered to the page is a subset of all javascript, based on what's needed
- Uses Yuyi JS library, a 2008 Yahoo library, plus jQuery
- Still ~800kb of Javascript, but the focus is getting HTML on the page first
These are all observations, so it's not clear if all or some are crucial for performance.