It's too late to disable loading heavy things at that point - the loading is already started.
Do the opposite, start loading heavy things if the page loaded quickly.
A clean way would be to set one of two classes, connection-slow or connection-fast, on the body element. Then you could use those classes in CSS to choose the correct assets for background images, fonts and so on.
Do the opposite, start loading heavy things if the page loaded quickly.
A clean way would be to set one of two classes, connection-slow or connection-fast, on the body element. Then you could use those classes in CSS to choose the correct assets for background images, fonts and so on.