palmfacehn a day ago

Where page speed is critical, I've found the simple solutions to be best. Remove all unused CSS and JS, minify and inline everything. One page, one HTTP request. Avoid images where possible by using SVGs. If I cannot achieve those goals immediately, I have placeholders and lazy loading.

Typically I can do a deep landing page pre-gzip for under 100kb. Tables, data, everything the searcher was looking for.

Large JS heavy apps can follow some of the same methods for the basic page structure, but you can allow yourself multiple requests to fill in content. Service workers generally mop up the mess here. Inlining a JSON object representing the user's state might save you a request.

  • XCSme 21 hours ago

    > One page, one HTTP request.

    Why do they recommend not using a sprite sheet for HTTP/2 /3 ?

    I understand it can do multiple requests in parallel, but if you have only one file, isn't it easier? Same download speed, plus you can better compress the images in a single file.

    • palmfacehn 6 hours ago

      Better usage of video memory as well.