1 min read

What are you doing on that page?

I read this interesting post about Javascript packaging on the Khan Academy engineering blog and I found their analysis about HTTP/2 and compression to be useful and insightful.

Towards the end of the article was the following paragraph, which should really be highlighted in bright red, using an extra-large font, perhaps wrapped in an underrated <marquee> tag:

The end result of our analysis is that our page isn’t going to load any faster until we reduce the amount of JavaScript we use on the page. Tricks like trying to load a bunch of stuff in parallel, or aggressive caching, might seem like appealing shortcuts, but nothing replaces just auditing the code and making it need less “stuff.”

You can invest a huge amount of time and effort on optimisations and only see marginal short-term gains. Direct your investment towards code health instead and you can deliver far more valuable long-term gains, not only in areas such as performance, but also in productivity and developer happiness.