Edge Delivery Services how-tos · updated
How to keep a Lighthouse score of 100 on Edge Delivery Services
Edge Delivery Services projects keep a 100 Lighthouse score by loading in three phases. Eager loads only what the largest contentful paint needs. Lazy loads the rest of your own code. Delayed loads third-party scripts such as tags and chat well after LCP. aem.live suggests keeping everything before LCP under about 100 KB and starting the delayed phase at least three seconds after LCP.
The three phases
| Phase | What loads | Rule of thumb |
|---|---|---|
| Eager (E) | Decoration, first section, LCP image, its block JS/CSS | Aggregate payload before LCP under ~100 KB; no second origin before LCP |
| Lazy (L) | Other sections and blocks, lazy images, first-party libraries | Mostly same-origin code you control |
| Delayed (D) | Martech, consent, analytics extensions, chat | Start at least 3 s after LCP; boilerplate gates it behind a consent check |
Common LCP problems
- The LCP image is loaded through a lookup (a fragment or JSON) so the loader guesses the wrong candidate; wait for the first block to finish before choosing it.
- Separate desktop and mobile hero images both in the DOM; remove the one not needed so it isn't downloaded first.
- Fonts or third-party scripts from another origin before LCP; each new connection costs time on mobile.
- Martech added to head.html, which aem.live strongly advises against.
Keep it at 100 with PR checks
aem.live notes it's hard to raise a low score but easy to keep 100 if you test continuously. When you open a pull request, the AEM GitHub bot runs PageSpeed Insights (mobile) on the test URLs in the PR description and fails the PR if the score drops below 100, with a small buffer for variance.
How to do it
- Start from the boilerplate, which scores 100 on PageSpeed Insights.
- Keep the first section small; check the LCP element in PageSpeed Insights.
- Move every third-party script into the delayed phase.
- Put test URLs in every PR description so the bot checks them.
- Watch field data (Core Web Vitals) after release.
Related pages on this site
Questions
Why does my EDS site score lower in the field than in Lighthouse?
Field data covers real networks and devices, so it often differs from lab tests; use both.
Can I add Google Tag Manager to head.html?
aem.live strongly advises against adding marketing scripts to head.html; load them in the delayed phase.
Does the boilerplate still delay third-party scripts by 3 seconds?
aem.live says loadDelayed() no longer enforces a hard-coded timer; add an explicit delay if you need one.
Sources
- aem.live: Web Performance, Keeping your Lighthouse Score 100 (checked 10 Nov 2026)
- aem.live: The Anatomy of a Project (checked 10 Nov 2026)
Facts about Adobe's platform are from the linked Adobe pages, checked 10 Nov 2026. Explanations and examples are ours unless marked as Adobe's.