Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

A build-level JavaScript budget can pass while a browser still downloads JavaScript your project did not build. In the page-specific observation behind this headline, 7.2 KB of script present around first paint was reported as not belonging to the author’s own code. The available account does not include a network trace, budget configuration, byte definition, or test conditions, so that figure cannot be independently verified or assigned to a particular script. The broader lesson is measurable: a bundle budget and a page-wide resource capture cover different things.

Why a passing JavaScript budget can miss browser-loaded code

A build tool typically checks files it knows about: a bundle, a set of emitted chunks, or another configured build artifact. A browser loads resources requested by the page, which can include scripts injected or requested at runtime and files hosted on other origins. Those scopes overlap, but they are not identical.

That distinction explains how a build can stay under its limit even when a page requests additional JavaScript. A third-party tag, an embedded widget, or a script added by a page integration may not be part of the artifact counted by the build check. The check has not necessarily malfunctioned; it may simply be answering a narrower question.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

MDN’s performance budget guide notes that development environments may lack third-party scripts or CDN optimizations, making file-size checks difficult to translate directly into time metrics. A file limit is useful for guarding the files it covers, but it is not automatically a total-page limit or a guarantee about paint speed.

What “7.2 KB” must specify to be meaningful

Browser timing data exposes several different byte measures. The PerformanceResourceTiming interface distinguishes the response transfer size, the fetched body before content decoding, and the body after decoding. These figures are not interchangeable with a bundler’s artifact-size report.

Measure What it represents What it does not tell you by itself
transferSize Response headers plus the resource payload transferred, as described by MDN’s transferSize documentation. It is not just the script body, and a reported zero does not by itself establish that no network bytes were used.
encodedBodySize The fetched response body before content decoding, such as decompression. It excludes response headers and is not the decoded in-memory body size.
decodedBodySize The response body size after content decoding. It is not necessarily the number of bytes transferred over the network.
Build artifact size The size reported for a file or files selected by a build tool or budget configuration. It says nothing about requests outside that configured build scope.

MDN’s Resource Timing documentation also describes an important ambiguity: transferSize can be zero for a cached response, or for a cross-origin resource when the server has not granted timing access with the Timing-Allow-Origin header. Check cache state and cross-origin timing permission before treating zero as proof that nothing was transferred.

So the headline’s 7.2 KB observation needs a byte definition before it can be compared with a budget. It also needs the captured page, browser, cache state, viewport and network conditions, plus the request URL, to support a reproducible attribution. Without those details, it is an author-reported page observation—not a general figure or a verified measurement of a named vendor script.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How to find scripts that a build report leaves out

  1. Define the capture. Record the exact page, browser and version, viewport, network conditions, cache state, and capture method. If repeat visits matter, capture both a cold load and a repeat load.
  2. Capture what the browser requests. Use the browser’s network diagnostics or collect PerformanceResourceTiming entries for the loaded document. Keep the request list or trace so the result can be reviewed.
  3. Compare the scopes. Set the build report beside the page-level list. Identify which resources are emitted by your build and which are requested from elsewhere or added at runtime; record each script’s URL and origin.
  4. Choose and report the byte measure. Say whether a reported size is a build artifact, transferSize, encodedBodySize, or decodedBodySize. For cross-origin requests, check whether Timing-Allow-Origin permits the timing values you intend to use.
  5. Check rendering impact separately. Inspect resource timing and the resource’s role in the page. Compare browser paint entries or a suitable trace under a defined setup before claiming that a script delayed paint.

This separates an inventory question—“what did the document request?”—from a performance question—“did a particular request affect the experience?” Both matter, but one does not prove the other.

Why “first-paint script” does not prove a paint delay

First Paint and First Contentful Paint are distinct browser paint entries. In supporting browsers, the Performance API can expose both; MDN’s navigation and resource timing guide explains how performance entries can be used to inspect page loading.

A script appearing in a capture near a paint event does not, on its own, show that it blocked that event. The script could have been requested without preventing the relevant paint, or could have been loaded after it. To support a causal claim, inspect a trace or compare paint measurements under controlled conditions while changing the resource or its loading behavior. A resource’s third-party origin is useful for attribution, not proof of harm.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Make the budget cover the experience you want to protect

A useful budget states its scope and its purpose. MDN describes budgets for individual files, file types, total page resources, and timing metrics, and recommends choosing conditions that reflect the audience’s devices and connection speeds. It also advises using warning and error thresholds: warnings prompt review, while an error threshold can block a release when a defined limit is exceeded.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Keep build checks for authored output. They are well suited to detecting growth in bundles and chunks that your build emits.
  • Add page-level checks for page-wide script use. Count or measure the scripts actually requested under a defined test setup, including runtime and third-party resources within the chosen scope.
  • Track experience metrics separately. Include relevant timing targets when the goal is user-perceived performance, and measure them under conditions representative of the audience.
  • Set explicit enforcement. Use a warning threshold for investigation and a release-blocking threshold where a regression should stop deployment.

Chrome’s documentation on the Lighthouse resource summary describes request-count and transfer-size diagnostics as diagnostic audits rather than direct inputs to the Performance score. That distinction reinforces the need to read a resource report as evidence about requests, then assess user impact with the appropriate timing data.

A good budget therefore does not replace page measurement. It makes its boundaries visible: which artifacts or requests are counted, which byte measure is used, whether cached and cross-origin cases are included, and which user-facing outcome the limit is meant to protect.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.