Drupal 8 Advanced Aggregation: Better PageSpeed Without Guesswork

Illustrated infographic summarizing: Drupal 8 Advanced Aggregation: Better PageSpeed Without Guesswork

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.
A practical decision matrix for inherited Drupal performance work.

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

Need help with this kind of work?

Discuss your Drupal performance plan Get in touch with Greg.

Sources

Latest articles

Check whether prompt caching reduces cost per completed task, accounting for cache writes, retries, review effort and the charges on your provider's bill.

A practical Drupal translation workflow for Danish service pages: German review, commercial approval, publication and keeping translations current after edits.

Build a weekly marketing report from GA4 and Google Ads with verified calculations, clear data caveats and a short AI draft to support your Monday meeting.

Before buying a GPU, test one real team workflow on existing hardware. A Linux pilot can show whether quality, memory, response times, and running costs add up.

Planning a Drupal relaunch? Set clear rules for content, translations, media and old URLs, with a practical checklist for approving the migration and launch.

Use AI for your online store’s alt text with a manageable pilot: map the images, generate suggestions in Danish, and check the results in WordPress and WooCommerce.

Supplier files need more than extraction. Here’s how to check coverage, match SKUs, resolve unclear units and prices, and test product data before a catalogue import.

Shorter TLS certificates leave less room for renewal problems. Check domain validation, scheduling, deployment and the certificate your customers actually receive.

AI image credentials can disappear during routine website processing. Learn how to test your CMS, optimizer, CDN, and publishing workflow end to end.

AI-based ticket analysis can uncover recurring complaints, product defects and gaps in documentation—without the company needing yet another chatbot.