Verify the response, build and behavior
How to audit JavaScript minification
Compare the delivered file with its source, raw and transferred size, versioning and site behavior. A .min.js filename alone proves nothing.
Quick browser check
- Open DevTools → Network, enable Disable cache, filter JS and reload.
- For a first-party file, record Request URL, Status, Resource Size, Transferred and
Content-Encoding. - Open Response. Production code is usually compact and omits development comments, but DevTools
{}pretty print does not alter the response. - Confirm the URL or manifest has a current hash/version and that a content change updates it on release.
- Check Console and complete critical actions on desktop/mobile.
Good result: the production file is smaller than source, loads at the current URL, creates no new errors, while sources remain separate and the build is reproducible.
How to rate findings
| Observation | Level | Action |
|---|---|---|
| Compact versioned file and working features | No issue | Save sizes and build ID |
| Tiny file is unminified with negligible savings | Low | Compare benefit with build cost |
| Large first-party bundle retains whitespace/comments | High | Configure a production minifier |
| Actions fail or the new artifact returns 404 | Critical | Restore the prior manifest/artifact |
Independent file comparison
curl -sS --compressed -o /dev/null \
-w 'download=%{size_download} bytes\n' \
https://example.com/js/app.min.js
curl -sSI https://example.com/js/app.min.jsThe first command records downloaded bytes for a negotiated compressed response; the second returns headers. Save both files and use wc -c for plain file size. Never compare different versions or error responses.
Discrepancies and scope
- DevTools pretty print adds visual line breaks but does not prove an unminified response.
- Gzip/Brotli changes Transferred, so do not confuse it with decoded resource size.
- A source map may be private to monitoring; absence of a public
.mapis not a failure. - Third-party files cannot be safely rebuilt without sources, licensing and vendor control.
- Minification does not prove unused JS is absent or measure execution cost.
Automated pricing applies to agreed files and templates on the service page. Use the step-by-step guide to configure it.