By Greg Nowak. Updated 2 August 2026.
Advanced CSS/JS Aggregation, usually called AdvAgg, can still help when you inherit a slow Drupal 8 site. But it is a diagnostic and delivery tool—not a cure for an oversized theme, indiscriminate module assets, or years of marketing scripts.
The business goal is also bigger than earning a green PageSpeed score. A useful performance project makes important pages faster for real visitors, protects forms and other conversion paths, and tells the team whether further tuning is sensible or merely postponing an overdue rebuild.
First decide whether you are tuning or upgrading
Drupal 8 reached end of life on 17 November 2021 and no longer receives core security fixes. AdvAgg’s project page now says the module is obsolete on Drupal 10.1 and newer, recommends uninstalling it on modern Drupal versions, and lists no supported stable release.
That creates a clear boundary. Use AdvAgg for controlled triage on an existing Drupal 8 installation when immediate performance problems are hurting the business. Do not introduce it as the foundation of a new performance strategy. Any substantial investment should include a route to a supported Drupal release; Drupal 10 itself is scheduled to reach end of life on 9 December 2026.
| Situation | Recommended decision | Immediate action |
|---|---|---|
| Drupal 8 must remain live temporarily | Stabilise and measure | Use AdvAgg cautiously while creating an upgrade backlog. |
| Drupal 10.1 or newer | Use Drupal core | Remove AdvAgg through a tested deployment and enable core aggregation. |
| Most transferred code is unused | Reduce assets first | Attach libraries only to the templates or components that need them. |
| Forms or navigation break after optimisation | Roll back the latest change | Fix dependencies before attempting another delivery optimisation. |
| Platform maintenance is already fragile | Limit tactical work | Spend enough to control immediate risk, then prioritise the upgrade. |
Measure pages that matter to the business
Do not optimise from one homepage test. Select a small, representative set: the homepage, a major service page, a paid-campaign landing page, a content-heavy template, and the page containing the most important form or transaction.
Run each URL through PageSpeed Insights on mobile and desktop. Record the result before changing anything. PageSpeed Insights combines controlled Lighthouse lab data with Chrome real-user field data when sufficient data exists. Lab data helps diagnose a particular run; field data describes visitor experiences collected over a trailing 28-day period. A higher lab score is encouraging, but it does not prove that real-user LCP, INP, or CLS has improved.
Keep a compact test log containing the URL, device profile, change made, caches cleared, before-and-after result, and any functional regression. This is especially valuable when an agency, hosting provider, and internal team share responsibility.
Use AdvAgg to reveal what Drupal is shipping
For an authorised account with the appropriate permission, append ?advagg=0 to a URL to disable file aggregation for that request. Use ?advagg=-1 when you need to bypass AdvAgg and its submodules completely. The unaggregated file names make it easier to identify the theme or module responsible for an asset.
On a local or staging environment, preprocessing and AdvAgg can also be disabled through configuration overrides:
$config['system.performance']['css']['preprocess'] = FALSE;
$config['system.performance']['js']['preprocess'] = FALSE;
$config['advagg.settings']['enabled'] = FALSE;Do not make this a production default. Reload the page with Chrome DevTools Coverage recording, then exercise menus, accordions, forms, consent controls, and other relevant interactions. Coverage reports used and unused CSS and JavaScript bytes. A file that remains largely unused is a lead for investigation—not automatic permission to delete it, because code may run only after an interaction or on another template.
Reduce asset waste before tuning delivery
Aggregation combines files; it does not make unnecessary code necessary. Drupal’s library system supports attaching assets globally, to a specific Twig template, or conditionally through a render element or preprocess function. A slider library should load with the slider component, for example, rather than every page in the theme:
{{ attach_library('mytheme/slider') }}Audit third-party code in the same way. Chat tools, maps, video embeds, analytics, personalisation, consent platforms, and A/B testing can compete for bandwidth and main-thread time. Ask who owns each script, which pages require it, and what decision or conversion it supports. Remove abandoned tools; scope or delay the rest where their behaviour allows it.
Change one delivery setting at a time
If AdvAgg is already installed, begin with reversible changes under admin/config/development/performance/advagg. Test minification before experimenting with script relocation or asynchronous CSS. Clear Drupal caches after each change and repeat the same page set.
Modifier options such as moving JavaScript to the footer or adding defer can help, but they can also expose undeclared dependencies or alter execution order. Regression-test navigation, search, forms, authentication, checkout, consent, analytics events, and logged-in administration. Precompressed gzip or Brotli assets may reduce transfer size when the web server is configured to serve them, but compression still cannot compensate for shipping irrelevant libraries.
Set a stop rule
Agree in advance when tactical optimisation ends. Warning signs include incompatible PHP requirements, unsupported modules, recurring cache failures, fragile deployment steps, and performance changes that consume more regression-testing time than they save.
The useful deliverable is not a perfect screenshot. It is a prioritised backlog separating quick asset fixes, hosting or cache work, third-party decisions, and upgrade dependencies. If you need an independent view of that trade-off, Greg can review the Drupal stack and turn the findings into a practical delivery plan.
Related on GrN.dk
- Critical CSS for Faster Pages: When It Helps and When It Does Not
- Why Your Website’s Third-Party Stack Needs a Real Owner
- AI Crawler Control for Business Websites: Protect Content Without Vanishing from Search
Need help with this kind of work?
Discuss your Drupal performance plan Get in touch with Greg.