AEM and Lighthouse: Auditing PWA performance for AEM sites
A progressive web app (PWA) can make an Adobe Experience Manager (AEM) site feel quicker on repeat visits, remain useful during a connection dropout and offer an installable experience. Those gains are not automatic. A page can pass visual review while shipping oversized images, render-blocking client libraries or a broken service worker. Lighthouse exposes these causes through repeatable performance measurements and implementation checks.
AEM Sites adds several moving parts: component markup, JavaScript and CSS client libraries, personalised experiences, consent tools, image renditions and often several third-party tags. Lighthouse sees the assembled result at a URL, so it can expose interactions between those parts, although it cannot explain the delivery architecture by itself. Teams need to connect each finding to templates, caching, dispatchers, CDNs and release decisions.
A credible audit combines a pinned Lighthouse run with real-user monitoring. The laboratory pass supports repeatable comparisons; field data shows whether Australians on real mobile networks encounter the same delays. The useful output is a prioritised remediation plan with owners, thresholds and regression checks, rather than a detached score.
Performance issues are amplified across Australia
Mobile use is routine across Sydney, Melbourne and Brisbane, particularly during commutes where people move between trains, underground areas and patchy cellular coverage. A service worker can preserve the shell of a journey or cache recently viewed content, but it can also cache stale HTML, consume device storage and create unpredictable update behaviour. Offline readiness therefore belongs beside speed testing, not in a separate exercise.
Regional Australia adds a different constraint. Customers around Wagga Wagga and Darwin may rely on fixed wireless, satellite or a single broadband connection, while travel routes cross network blackspots where throughput falls quickly. NBN availability and mobile data caps make every transferred kilobyte commercially relevant. Test a content-heavy article, search journey and conversion path under constrained mobile conditions.
Performance claims also carry legal and commercial weight across Australian retail, banking and travel markets. Analytics and personalisation should be assessed against the Privacy Act 1988 (Cth) and the Australian Privacy Principles, including transparency, data minimisation and consent. Claims such as instant loading or offline access can create Australian Consumer Law exposure when they are misleading. Historical technical context is available in the CIRCUIT session recordings, covering AEM integrations, architecture and front-end delivery from the two-day Chicago conference in 2015 and 2016.
Build a representative Lighthouse audit
Start with journeys rather than a home page. Select a template that matters commercially, such as a product detail page, article, search result or account landing page, and record the actions required to reach it. Include shared headers and footers, because AEM client libraries and consent components can affect every route differently. The same URL should represent each template, while query parameters and personalised variants are tested separately where they change the payload.
Control the test profile before comparing scores. Run desktop and mobile profiles, then repeat mobile runs with a cold cache and a warm service-worker cache. Use the same browser build, Lighthouse version, network profile and content state for each cycle. A small scripted throttle is useful for consistency, but supplement it with tests that reflect Australian mobile conditions rather than assuming one laboratory profile represents every commuter.
Record machine-readable output and inspect the trace, not just the score. A Chrome DevTools Lighthouse panel is convenient for diagnosis, while a command such as npx lighthouse "$AUDIT_URL" --output=json --output-path=audit.json supports repeatable CI runs. For authenticated AEM pages, use a dedicated test account and a non-production profile; never place credentials or personal information in URLs. For headless AEM, audit the final rendered frontend and measure content API payloads and cache behaviour separately.
Trace AEM delivery problems to their source
Start from the trace timeline and identify the request or main-thread task responsible for the delay, then trace it back through the AEM component tree. Check whether image sizing, client-library placement, personalisation calls or third-party scripts are creating the bottleneck. This workflow keeps the audit actionable: a slow Largest Contentful Paint element becomes an image-rendition task, while a late interaction becomes a JavaScript ownership question.
| AEM delivery source | Lighthouse symptom | Checks before changing code |
|---|---|---|
| Oversized media and missing responsive sources | Slow LCP and high transfer size | Review DAM renditions, dimensions, srcset, caching and modern formats |
| Heavy or badly placed client libraries | Late rendering, long tasks and high blocking time | Split bundles, minimise code, defer non-critical scripts and inspect CSS |
| Weak dispatcher or CDN caching | Slow server response or repeat-view downloads | Check cache headers, time-to-live, invalidation and edge rules |
| Tag, chat and personalisation services | Main-thread contention and unstable timings | Map each script, consent trigger, timeout and fallback path |
A PWA check should cover the web manifest, HTTPS, icons, installability, service-worker registration and a usable offline response. Run it after the worker has activated, since a first visit may register it without controlling the page. Cached responses need versioning, expiry and rollback rules; an offline page that opens while the main document fails is not a resilient experience. Lighthouse’s PWA reporting varies by version, so pin the tool and inspect the underlying audits where a separate category is unavailable.
For performance interpretation, pair field metrics with laboratory signals. LCP and Cumulative Layout Shift can be reproduced reasonably in a clean run, while Interaction to Next Paint depends on real interactions and user conditions. Total Blocking Time is a useful laboratory warning, not an INP substitute. Report scores beside the underlying timings, transferred bytes and failed audits so that a passing grade cannot conceal a fragile service worker or a costly third party.
Signals to capture in every run
- Route, template, device profile and cache state
- LCP, CLS, INP or blocking-time evidence
- JavaScript, CSS, image and third-party transfer size
- Service-worker version, cache hit rate and offline result
Combine laboratory evidence with field signals
Lighthouse is strongest as a controlled comparator. Field telemetry is strongest as evidence of customer impact. Use real-user monitoring to record navigation timing and Web Vitals at a small percentage of page views, then segment percentiles by page type, connection type, region and release. This reveals problems hidden by laboratory averages, such as slow first visits on regional connections or interaction delays caused by a campaign tag.
Start with aggregate data and short retention periods. A web-vitals library can collect LCP, CLS and INP in the browser, while a Performance Observer or beacon pipeline moves approved measurements to analytics. Apply consent and privacy controls before collection, restrict access to identifiable sessions and document deletion rules. Replace averages with the 75th percentile, with separate views for mobile and desktop audiences.
Operational ownership matters once more teams depend on these measurements. The governance patterns discussed at the DataOps Summit offer a useful model: define data quality, ownership, lineage and alert thresholds before dashboards multiply. For AEM performance, that means linking each metric to a release, component owner and business journey. It also prevents a synthetic score from conflicting with a real-user regression.
Turn findings into an accountable release process
Rank remediation by customer impact, effort and architectural reach. A dispatcher cache rule that removes repeated downloads may deliver more value than optimising a single component, while a broken checkout service worker deserves attention before a minor image improvement. Attach a target and owner to every item, then test the fix under the same mobile and cache profiles used in the original audit.
A repeatable release gate
- Assign every failing audit to a template, component, tag or infrastructure owner
- Block regressions that breach agreed route-level performance thresholds
- Store Lighthouse JSON, traces and release metadata together
- Review field percentiles and service-worker errors after deployment
Changes should be made at the layer that controls the behaviour: component constraints for media, client-library categories for bundles, service-worker policies for offline behaviour, and dispatcher or CDN rules for delivery. Document the architecture decision so future AEM upgrades do not erase the improvement. Re-run the audit in CI, publish a concise comparison with the previous release and include accessibility, best-practice and search checks that may affect the same template.
Make the next AEM release accountable by running the pinned mobile audit against a critical Australian journey, attaching its JSON report and trace, and assigning an owner to every regression. Publish only aggregated field results that meet the Privacy Act 1988 and the agreed retention policy, then repeat the same checks before customers see the change.