Skip to content
EUID Audit service & seal, Home
Get your website audited

This translation has not been editorially reviewed yet. The German version is authoritative. Deutsche Fassung

CO₂ & EmpCo

Why are more than 25 script files per page view a finding?

Many websites load their JavaScript in many individual files: one per extension, per slider, per form, per analytics service. On every measured page, the home page and the subpages, the check counts the script files a view loads. If there are more than 25, the finding is raised.

Why the number of files matters

Every script file is a request of its own. A script in the head of the page stops the build until it is loaded and executed; with defer, async or type="module" the browser keeps rendering. Many files mean many transfers with connection overhead and, in the head, many pauses. The limit of 25 was set by euid.com. It is just above the median: according to the Web Almanac 2024, a page loads a median of 22 script files on phones and 23 on desktop, and one page in ten loads 68 or more on phones.

What the other findings say about it

How many scripts in the head stop rendering is shown by a separate finding in the Performance audit area. How large the JavaScript is overall is shown by the JavaScript share finding. The number of files here tells how fragmented it arrives.

Where many script files come from

CMS extensions often load their file on every page, even if their form or slider is on a single one. Page builders load their modules individually. A tag manager loads further services, and chat windows, consent banners and testing tools come on top.

Examples

Head of the page

Not met
<script src="/plugins/slider/slider.js"></script>
<script src="/plugins/forms/forms.js"></script>
<script src="/plugins/lightbox/lightbox.js"></script>
<!-- … und 30 weitere Dateien -->
Passes
<script src="/assets/seite.4f2a9c.js" defer></script>
<!-- gebündelt; der Browser zeichnet weiter, während die Datei lädt -->
  • List the page’s scripts (browser developer tools, Network tab, JS filter) and assign each to an extension or a service.
  • Load each extension and service only on the pages where it works, and remove the rest.
  • Bundle the remaining scripts into a few files, in the CMS via an optimisation option or in the build tool.
  • Load scripts that are needed later with defer or only on demand.

Deutsche Fassung dieser Seite

  • Seal Digitale Barrierefreiheit
  • Seal Daten & Recht
  • Seal Technische Qualität
  • Seal Digital Excellence
  • Seal Cyberversicherung

Audited. For a better digital future.euid.com

Why are more than 25 script files per page view a finding? · euid.com