Add

Lorem ipsum

Lorem ipsum

A
A
A
SEO / GEO

0 views

6 min

How to Reduce Unused JavaScript in Webflow

Learn how to identify and reduce unused JavaScript in Webflow to improve your TBT and INP.

In this tutorial, Sandro, cofounder of Gemeos Webflow agency, shows you how to identify and reduce unused JavaScript in Webflow to improve your TBT and INP.

JS sourceImpactSolution
Third-party widgets (Intercom, HubSpot, chat)Very highDeferred loading via GTM
Webflow Interactions scriptsMediumRemove unused interactions
Fully loaded jQuery librariesMediumLoad only the module you need
Ad pixels (Meta, TikTok)HighCentralize in GTM + Window Loaded trigger

1. Identify heavy scripts with Chrome DevTools

In Chrome DevTools, open the Network tab, filter by JS, and reload the page. Sort by size, largest first. Usual suspects: Intercom (>300 KB), HubSpot tracking (>200 KB), and ad pixels. Note the heaviest third-party domains.

2. Load third-party scripts lazily

In Webflow, don’t add third-party scripts directly in the head. Go through Google Tag Manager and set up a Window Loaded trigger instead of All Pages. That pushes loading back until after the page’s initial render.

3. Load widgets on click

For chat widgets (Intercom, Crisp), load the widget only when the user clicks the open button. Add this script in the body:

document.getElementById('chat-trigger').addEventListener('click', function() {
// Load the chat script here
var s = document.createElement('script');
s.src = 'https://widget.intercom.io/widget/VOTRE_APP_ID';
document.head.appendChild(s);
});

4. Remove unused Webflow interactions

In the Interactions panel, delete any interactions you created but never use. Every interaction adds JS to the Webflow bundle. A clean project with few interactions can reduce Webflow JS by 30 to 50 KB.

good to know

JavaScript is the most expensive type of resource for the browser: it blocks the main thread during parsing AND execution. 100 KB of JS costs far more in performance than 100 KB of images. Prioritize reducing third-party scripts before optimizing your own code.

Conclusion

Reducing unused JS improves TBT and INP, two Core Web Vitals metrics. Use cases:

  • Sites with lots of third-party integrations (chat, CRM, pixels)
  • Ad landing pages where every millisecond counts
  • Improving INP scores on interactive pages

Good to know

Heading

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

Lorem ipsum dolor sit amet consectetur.

Lorem ipsum dolor sit amet consectetur. Aliquam orci sagittis dignissim sapien praesent donec.

Lorem ipsum

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Published on

You might be interested in these tutorials

Similar tutorials

SEO / GEO

5 min read

5 views

How to Set Up a Redirect in Webflow? (2026)

Updated on 19.12.2025 by Sandro DA SILVA

SEO / GEO

5 min read

5 views

Add structured data to your Webflow site?

Updated on 21.08.2025 by Sandro DA SILVA

No-code

5 min read

5 views

How to Obfuscate a Link in Webflow

Updated on 23.04.2025 by Sandro DA SILVA

Let’s f*****G GO !!

Ready to launch
Your business?

Alexandre

Max

Enora

Bryan

Cannelle

Tiphaine

You'll :heart: our collaboration...