Remove unused javascript?

Hello,

I just ran my webpage through Google Speed Test and it suggested, amongst other things, that I should:

  • Remove unused Javascript
  • Eliminate render-blocking resources

How would I do that in Bootstrap Studio?

/RB

https://developers.google.com/web/tools/chrome-devtools/coverage

1 Like

Generally speaking, most page speed improvements are outside the realm of things you can do from within Bootstrap Studio. Improving page load time is more of a specialized area akin to search engine optimization.

You basically have to knuckle-down and start doing research on what slows down page load, and what methods and techniques can be used to mitigate the delays.

Keep in mind that Google Page Speed Insights is not the final word on page optimization. They simulate a 3G connection on mobile, which is kind of ridiculous in 2020. when 95% of the country is served by 4G, or broadband landlines. Unless you know your clients are stuck on 3G connections, I wouldn’t get too hung up on "unused javascript. You’re usually talking about tenths of seconds there.

Render blocking resources could be more problematic, depending on what those resources are. Bootstrap Studio loads all the CSS files and fonts for your entire site in the head of your page home page, so the biggest “blockage” is going to be the Bootstrap.min.css file itself. Google fonts are also potential slowdowns. There are ways to strip out unused Bootstrap classes. You can host Google fonts on your own server, etc, etc… but you’re probably talking about a matter of 1-2 seconds.

I have a site that Google says the “time to interactive” is 10 seconds on mobile, and 1.4 seconds on desktop. On my 4G mobile phone, the page loads in under 2 seconds, and on my desktop it loads in under a second. So I don’t get too hung up on Google Page Speed Insights. Truth is, it’s more beneficial to THEM to have pages load quickly, which is why they push it so hard.

1 Like

Funny thing too being that Google is the culprit that 99.9% of the time I am waiting to finish loading content on the page long after everything else has completed. Takes forever sometimes for Google to sit and load and load and load, whatever it is trying to load. Pretty sad when the company that is controlling our production (Google) by calling for more speed, is the slowest loading part of our sites. :confused:

1 Like

Thank you for your replies :slight_smile: