DEV Community

Discussion on: What's your approach to reduce loading time of a web app?

Collapse
 
kayis profile image
K

It's all about latency.

Get your stuff close to the client. Use a CDN with anycast helps here.

Slim down your assets, best don't even use images. Check if you can build it smaller with SVG or CSS.

TCP won't use 100% of the available bandwidth with the first request, it will try to saturate the connection more and more with bigger packages, so it can lead to fewer roundtrips if your data needed for the first meaningful paint is very small.

Stream your HTML, so the client can render before they got eveything.

And, yes, lazy loading of assets that are big and not needed at the beginning helps too.