Unused JavaScript / CSS
JavaScript or CSS the browser downloads for a page but never executes or applies during the visit.
See it
What it is
Unused JavaScript and CSS are bytes a page downloads but does not use during the recorded visit. Chrome DevTools Coverage marks JavaScript ranges that never executed and CSS rules that never applied. Common sources are site-wide bundles, libraries imported whole, old styles, and features loaded before anyone opens them. The classic case is a full Bootstrap stylesheet shipped for a handful of grid classes.
Reach for Coverage when the Network panel shows a large script or stylesheet but the current route uses only a sliver of it. Delete dead code, tree-shake unused exports, split route and feature code behind import(), and extract the CSS needed by each page instead of shipping one historical stylesheet everywhere.
Gotcha: unused is session-specific. A menu, error state, media query, or checkout flow can stay red until you trigger it. Record all important states before deleting anything, and safelist class names created dynamically when using PurgeCSS or a similar static scanner.
Ask AI for it
Remove unused JavaScript and CSS from this route. Record Chrome DevTools Coverage while exercising navigation, menus, dialogs, errors, media queries, and authenticated states; rank files by unused transferred bytes. Delete dead modules and rules, replace broad barrel imports with direct imports, split optional features with import(), and configure PurgeCSS with an explicit safelist for runtime-generated class names. Run visual and interaction tests, then report before and after transferred bytes plus Coverage percentages for each changed file.