The mythical “fast” web page
A fast web page is not mythical. It&#x27;s also not some unknowable or untestable thing. If you make a page of X bytes, Y number of resources of Z bytes, you can pretty easily calculate load time ranges for a variety of network conditions.<p>You&#x27;re never going to be able to overcome physics so you aren&#x27;t going to somehow make a ten megabyte JavaScript monstrosity load instantly over a spotty 3G connection in the middle of nowhere.<p>What you can do is give some worst case connection the best chance you can to successfully load your page.<p>Instead of building it all in the DOM with JavaScript send the client the damn HTML. Send some baseline CSS in a style tag. Use CSS patterns instead of big header images or backgrounds. Use box&#x2F;text shadows to make elements stand out without images. Bundle as much as possible (CSS sprites, JS bundles, etc) to cut down on external resource requests. Minify and compress the shit out of everything. Include a viewport meta tag.<p>It&#x27;s not <i>that</i> difficult to have a good looking and functional page that&#x27;s literally a single HTML page. A single compressed resource that has everything it needs in a single load.<p>We&#x27;re actually in an era where the average web browser is extremely capable and isn&#x27;t some version of IE. Even super low end Android phones have a very capable browser installed by default. You&#x27;ve got HTML5 and CSS3 along with at least ES6 everywhere. The same is true on the desktop in most areas.<p>There&#x27;s also just <i>so much</i> shit you <i>don&#x27;t</i> need in most pages. Far too many people treat a web <i>page</i> like it&#x27;s some full blown mini OS. There&#x27;s also a seeming generation of web devs that have no idea what browsers do and think they need to include the kitchen sink to display some text or load resources. You definitely don&#x27;t need to override scroll events.<p>You can never make a universally fast page because you don&#x27;t control the user&#x27;s environment. But you can make pages and fast and as light as possible so they&#x27;re not wasting anyone&#x27;s time or battery. You can also focus on uncached loads because honestly that&#x27;s going to be a majority of visits.