JavaScript is hardly ever your web performance bottleneck

I’ve noticed that it’s common for web developers to charge ahead with the assumption that JavaScript is making their web application slow. While poorly-tuned JavaScript might contribute to performance issues, most of the time it’s minor and distracting developers from bigger, simpler wins.

Make sure you check off all of the web performance best practices before performance-tuning your JavaScript; serve everything gzipped, avoid redirects, fully optimize images (smushit), include JavaScript at the bottom of the page and definitely after CSS, combine and minify css/js…etc.

Here’s the original Steve Souders list of best practices and an extended web performance best practices list from Yahoo.

Also install and use Google Page Speed Insights in your browser. Google has an ulterior motive for helping you make your site faster, so you can rely on that advice.

You can also use FrontendTest as an additional weighted web performance audit.

If you’re working on a JavaScript framework or very commonly used plugin, like JQuery or something, that many people use, well then go ahead and tune your JavaScript. Are you John Resig, for example? Probably not. Please use web performance best practices to make your site faster.