Drupal 8 Advanced Aggregation: Faster Pages Without Guesswork

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

By Greg Nowak. Updated 19 September 2026.

Advanced CSS/JS Aggregation—better known as AdvAgg—can still help diagnose a slow Drupal 8 website. It can expose what the site is shipping, make controlled delivery improvements and buy time while a larger upgrade is planned. What it cannot do is make an unsupported platform safe or turn an oversized front end into a well-designed one.

For a business owner or delivery team, the objective is not a perfect PageSpeed screenshot. It is a faster and more dependable experience on the pages that generate enquiries, sales or operational value—without breaking forms, navigation, analytics or consent controls.

Start with the platform decision

Drupal 8 reached end of life on 17 November 2021. It no longer receives core security fixes, so performance work on it should be treated as short-term risk management rather than long-term platform investment.

AdvAgg also has a clear boundary. Its project page describes the module as obsolete for Drupal 10.1 and later because core now provides most of its aggregation capabilities. The project has no supported stable release and recommends uninstalling it on Drupal 10.1+ and Drupal 11.

Do not start a new AdvAgg implementation on a modern Drupal site. If the business is still running Drupal 8, use it carefully for diagnosis and reversible improvements while building an upgrade plan. Moving only to Drupal 10 is no longer a sensible destination: Drupal 10 reaches end of life on 9 December 2026.

Current situation Best decision Next action
Drupal 8 must remain live temporarily Stabilise, measure and limit investment Use AdvAgg only for controlled triage and create an upgrade backlog.
Drupal 10.1 or later Rely on Drupal core aggregation Test the removal of AdvAgg through the normal deployment process.
Pages contain large amounts of unused code Reduce assets before tuning delivery Attach libraries only to the templates and components that need them.
Forms or navigation fail after optimisation Roll back the latest change Correct dependencies and execution order before trying again.
Maintenance is already fragile Stop polishing the legacy stack Control immediate risk, then redirect effort toward migration.
A decision matrix for balancing immediate Drupal performance work against platform risk.

Measure the journeys that matter

Testing only the homepage hides many problems. Choose a small representative set: the homepage, an important service or product page, a campaign landing page, a content-heavy template and the page containing the most valuable form or transaction.

Run each URL through PageSpeed Insights on mobile and desktop before changing anything. PageSpeed Insights combines Lighthouse lab testing with Chrome real-user data when enough traffic is available. Lab data helps diagnose one simulated visit. Field data describes actual Chrome experiences over the previous 28 days and may be reported at page or origin level.

Record the URL, device profile, test date, change made, caches cleared and any regression. Repeat important lab tests to reduce the influence of run-to-run variation. A better Lighthouse score is useful evidence, but it does not prove that real users now receive better LCP, INP and CLS results.

Use AdvAgg as a diagnostic tool

On an authorised account with the bypass advanced aggregation permission, append ?advagg=0 to a page URL to disable file aggregation for that request. Use ?advagg=-1 to bypass AdvAgg and its submodules completely. The resulting file names can reveal which theme or module owns an expensive asset.

On local development or staging, preprocessing and AdvAgg can also be disabled with configuration overrides:

$config['system.performance']['css']['preprocess'] = FALSE;
$config['system.performance']['js']['preprocess'] = FALSE;
$config['advagg.settings']['enabled'] = FALSE;

Do not leave those overrides active in production. Open Chrome DevTools Coverage, begin recording, reload the page and exercise the real interface: menus, accordions, forms, consent choices, search and any logged-in workflow under review. Coverage reports used and unused CSS and JavaScript bytes.

Treat a high unused-byte count as an investigation lead, not a deletion order. A script may run only after interaction, for a particular role or on another page template.

Remove waste before changing delivery

Aggregation combines files; it does not make unnecessary code useful. Drupal libraries can be attached globally, through a render element or only where a particular Twig template is used. Component-specific assets should normally travel with their component:

{{ attach_library('mytheme/slider') }}

Review third-party code at the same time. Chat widgets, video players, maps, analytics, experimentation tools and personalisation platforms compete for bandwidth and main-thread time. For each script, identify its owner, the pages that require it and the decision or conversion it supports. Remove abandoned tools and restrict the rest where their behaviour permits.

Make one reversible change at a time

If AdvAgg is already installed, start with modest changes under admin/config/development/performance/advagg. Test minification separately from options that move JavaScript, add defer or load CSS asynchronously. Clear the relevant caches after each change, then rerun the same URLs and functional checks.

Changing script placement or execution can reveal undeclared dependencies and timing assumptions. Regression-test navigation, search, authentication, forms, checkout, consent, analytics events and administrative pages. Precompressed gzip or Brotli files can reduce transfer size when the web server serves them correctly, but compression cannot compensate for loading irrelevant libraries.

Agree on a stop rule

Decide in advance when tactical tuning ends. Strong warning signs include unsupported modules, incompatible PHP requirements, recurring cache failures, brittle deployments and optimisation changes that demand disproportionate regression testing.

The most valuable output is a prioritised plan: quick asset reductions, server or cache work, third-party decisions, functional risks and upgrade dependencies. That gives management something more useful than a score—it shows where the next hour or budget line will have the greatest effect.

If ownership is unclear or the legacy platform keeps absorbing delivery time, Greg can review the Drupal stack and turn the findings into a practical performance and upgrade plan.

Related on GrN.dk

Need help with this kind of work?

Discuss your Drupal performance plan Get in touch with Greg.

Sources

Seneste artikler

Jeg lærte serverdrift ved at ødelægge mine egne servere. Jeg søger en, der vil stå ved siden af mig, mens jeg gør det, og så gøre det selv ugen efter.

Jeg er god til at bygge og dårlig til at ringe. Her er, hvem jeg vil have ved siden af mig, hvad der er lettest at sælge, og hvordan vi deler det.

AI kan samle onboardingopgaverne før første arbejdsdag. Se, hvordan lederen godkender konkret adgang, og hvordan åbne opgaver bliver fulgt til dørs.

En AI-assistent kan svare på spørgsmål og føre kunder til booking. Her er de konkrete grænser for pris, levering, personoplysninger og kontakt med en medarbejder.

Et sikkert AI-workflow kan omsætte Meet- og Teams-transskripter til godkendte beslutninger og opgaver i Jira eller Asana – uden at slippe kontrollen.

AI kan finde opsigelsesfrister og prisreguleringer i leverandørkontrakter, sende usikre fund til godkendelse og oprette de rette påmindelser.

Sådan automatiserer danske virksomheder Gmail og Microsoft 365 med hurtig sortering, begrænsede rettigheder og menneskelig godkendelse.

Samme kunde på flere kort i HubSpot? Se, hvordan CVR-match, AI-forslag og menneskelig godkendelse kan bruges til at rydde op med styr på felter, relationer og kundehistorik.

Få en ugentlig marketingrapport fra GA4 og Google Ads med kontrollerede beregninger, tydelige dataforbehold og et kort AI-udkast, der hjælper jer på mandagsmødet.

Brug AI til webshoppens alt-tekster med en overskuelig pilot: kortlæg billederne, få danske forslag, og kontrollér resultatet i WordPress og WooCommerce.