Izzi Smith Profile picture
May 28, 2021 10 tweets 5 min read Read on X
Hey friends, let's chat about dealing with unused and render-blocking JavaScript! 🧩

I see this topic popping up frequently in audits and I've been asked how to deal with it in my Tech SEO Help Hours, so here's a quick intro thread on what you can do 🧵 (1/10)
2/10. What's the issue with unused JS? Well:

😴 the browser needs time and resources to process the script, with no benefit for the visitor.
📲 mobile users may have to use extra data when accessing the page
👯‍♀️ it's commonplace, as many files or scripts might be bundled together
3/10. It's basically really detrimental to your performance, Core Web Vital scores, and therefore the general UX of your site, so better tackle it I say!

Let's take a look at a couple of things you can do to improve this issue, or better communicate some causes.
4/10. First of all, do a big assessment of your existing plugins. Clean up the unused , update the old, and find overlaps to merge. If you have a big team working on the CMS, make everyone provide a case for theirs. This can be a *big win* driven by SEO / content teams 💪
5/10: Identify unused JS that could be dealt with accordingly. You can do this in Dev Tools. Just head to More Tools > Coverage > & go! This shows which scripts & CSS files were not critical or were unused during the page load. Here's the status of my pals Brewdog:
6/10. Of course, some JS is important *after* the page loads and when users interact with elements. (note: "some"). Choosing the file and visiting the "Source" tab shows you the unused lines of code for review, but your developer can assess this best.
7/10. For non-critical JS files (code that's not needed for the page's main functionality.) you can mark the script's URL with "defer" or "async". Unless there is a specific reason not to, all third-party scripts should be loaded with either defer or async by default.
8/10. A good solution could also be bundling & code-splitting. This technique "splits" the code, cleans it up, & creates neat bundles for critical and non-critical code. Some well-known bundlers are Webpack, Browserify & Rollup (but best handled by web dev specialists!).
9/10. I'm using @Ryte_EN to crawl sites with Lighthouse and then understand the templates with heavy scripts, checking a few manually to uncover what could be optimized (e.g. deferred or bundled/split), and then creating my priority. This speeds up the analysis *massively*.
10/10. That was the quick chat about handing unused and render-blocking JavaScript! There are many ways of handling this, and it varies for every set-up. I'd love to hear what works for you, and hope this was helpful! #friendlyJS #CWV ❤️

Now, happy Friday! 🍻🥳

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Izzi Smith

Izzi Smith Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @izzionfire

Nov 10, 2021
Last week at the magnificent @turingfest I gave my first ever talk on how and why we should all create more sustainable websites and digital experiences. I'm going to continue exploring this topic in much more detail, but here's a quick summary for now! 💚 (1/12) Image
2/12: We commonly see the web as inherently green - what goes on behind the scenes of virtual communication and information transfer can all too invisible but the truth is, the carbon footprint of our websites and supporting systems is 3.7%, the same as the airline industry. Image
3/12: This figure was said to *double* by 2025, but the study that uncovered this (by The Shift Project) was carried out in 2019 - before the Corona pandemic shook us all and saw us rely on digital technology far more than before. This figure is therefore a lot higher. Image
Read 12 tweets
Feb 9, 2021
Remember, there are situational "ranking factors" that are out of your control. You can't have a direct impact on things like:
- perceived relevance
- searcher habits
- seasonality
- competitor activity
But you should be aware of them, and adjust strategies if needed.

Part 1/14:
[2/14] Let's take perceived relevance. Why perceived? Because a Search Engine can only make an assumption on the searcher's meaning and intent.

This is improving astonishingly, but if you're simply far away from the perceived relevance then you have no chance...
[3/14] That is, unless, you:
1. Study the SERPs to better understand the perceived relevance of a query
2. Identify ways of ranking there
3. AND assess if your brand *can* rank there
Easy peasy.
Read 15 tweets
Jun 26, 2020
I'm getting *so* used to virtual conferences now. I still feel slightly awkward as I love seeing and connecting with my audience (how else can I know if my lame joke landed?!) but here are some tippy tips that help me keep improving! 🌻🗣️🎥 [a thread]
Tip 1/9:
A 2nd screen is a must-have (also very helpful for finicky slide deck prep).
If you feel comfortable having notes in front of you, enter presenter mode and add the full screen slides to your 2nd screen (and share that on the webinar software). No one will ever know!
Tip 2/9:
A good mic goes a LONG way. Some may cost >€100 but once you've got more into online events, there's nothing stopping you from doing podcasts / webinars in the future! 🔥 My favourite is the RODE NT-USB (€179), but there are many decent cheaper ones out there too!
Read 13 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(