Websites are getting heavier and heavier. This is a fact, regularly highlighted by numerical reports and illustrated by those from Web Almanac. In 10 years, the weight of a page's resources has multiplied by 4 on Desktop, and by almost 10 on mobile.

For nearly 10 years, this constant increase in page weight was mainly linked to images, which were getting larger despite the widespread adoption of responsive features and progressive enhancement/graceful degradation (picture element, srcset attribute...). JavaScript, on the other hand, changed little, and you could find jQuery + a few plugins and Google Analytics almost everywhere. Period.
What has changed?
In the minds of many (developers, web agencies, publishers...), it was estimated as early as 2015 that JavaScript was THE solution to take websites to the next level in terms of User Experience. JS frameworks have become widespread, SPAs (for "Single Page Apps") using React and Angular have become THE new must-have, PWAs have been featured on web marketing blogs... In short, JavaScript has become essential for any self-respecting website publisher.

In parallel, we started using Tag Managers to add advanced website features for traffic monitoring (Google Analytics…), advertising/social retargeting (Facebook…), Voice of Customer (Zendesk…), A/B testing (AB Tasty…), behavioral analysis (Hotjar…), accessibility improvement (AccessiBe), anti-bot Captcha (Recaptcha…). And that was without counting on the arrival of CMP platforms (for “Consent Management Platform”), made essential by the GDPR and also built 95% on a JavaScript base to interact with cookies (see our CMP comparison).
Is your site as fast as your visitors expect?
Too much poorly managed third-party JavaScript
This proliferation of third-party JS is also often associated with a poor understanding/management of the issues. Very often, our clients load 2 or even 3 GoogleTagManagers or Google Analytics to access data internally while allowing their service providers (web or SEO agency) to view the data. However, a simple GTM configuration allows sending data to multiple Google Analytics accounts.
Other pitfalls are unfortunately just as common:
- Poor CMP configuration, with third-party scripts loading even without user consent (making it useless);
- Presence of an A/B testing script while no test is running, which heavily penalizes loading times for no reason;
- Presence of Facebook, TikTok, or other retargeting scripts while no advertising campaign is running;
- Poor loading prioritization, with third-party scripts sometimes loading before scripts necessary for the site's functionality.
If there's a message to get across?
JavaScript is evil! This statement, intentionally a bit exaggerated, at least puts priorities into perspective: the more third-party JavaScript on a site, the worse the User Experience will be. Why? Because these scripts generate “Blocking Time,” which makes interfaces less responsive and usable (lags, freezes, inability to interact…). This experience is materialized by TBT (for “Total Blocking Time”) in performance analysis tools like Lighthouse and PageSpeed Insights, and under the acronym INP (for “Interaction to Next Paint”) within Google’s Core Web Vitals.
Too much JavaScript, therefore, penalizes not only your visitors but also your "Page Experience" as Google perceives and takes it into account. Knowing that this data is now an integral part of Google's ranking algorithm on mobile AND desktop, it seems wise to pay the utmost attention to it: if you want to maximize your chances of being visible in Google's search results pages (the famous SERPs), this is a project to undertake!
How to better manage JavaScript?
At Agence Web Performance, we deal with these third-party script management issues daily. As part of our audits and optimizations, re-prioritizing the loading of these resources is always a crucial step (if they cannot simply be removed). Fortunately, there are indeed techniques to reduce their impact on user experience, notably through the HTML attributes "async", "defer", but not only. It may also be relevant to delay the execution of these scripts, whose loading is transparent to the user, until the first interaction (hover, scroll, click...).

If you are experiencing these types of issues on your site (unresponsive interfaces, high bounce rates…), do not hesitate to contact us. We master techniques for improving the performance of your pages, on the JavaScript side of course, but much more! Carrying out this type of project on an existing site can multiply the PageSpeed Insights score by 2.5 on average, and the difference is all the more appreciable the slower the site was initially. If this is your case, do not lose hope: take action 😉