Skip to content

Add Soft Navigation docs - #45053

Merged
chrisdavidmills merged 31 commits into
mdn:mainfrom
tunetheweb:soft-navs
Aug 12, 2026
Merged

chrisdavidmills merged 31 commits into
mdn:mainfrom
tunetheweb:soft-navs

Conversation

@tunetheweb

Copy link
Copy Markdown
Contributor

Description

Chrome 151 includes the Soft Navigations and Interaction Contentful Paint spec addressing a long-standing issue of measuring performance across SPAs

Motivation

Document APIs available unflagged in Chromium-based browsers

Additional details

Related issues and pull requests

I've a BCD change in flight for this too (mdn/browser-compat-data#30195), but it's waiting on w3c/browser-specs#2593 to land first

@tunetheweb
tunetheweb requested review from a team as code owners August 7, 2026 18:45
@tunetheweb
tunetheweb requested review from sideshowbarker and removed request for a team August 7, 2026 18:45
@github-actions github-actions Bot added Content:WebAPI Web API docs Content:Glossary Glossary entries labels Aug 7, 2026
@github-actions github-actions Bot added the size/l [PR only] 501-1000 LoC changed label Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor
Preview URLs (21 pages)

Flaws (1)

Note! 20 documents with no flaws that don't need to be listed. 🎉

Found an unexpected or unresolvable flaw? Please report it here.

URL: /en-US/docs/Glossary/Contentful_paint
Title: Contentful paint
Flaw count: 1

  • macros:
    • Macro htmlelement produces link /en-US/docs/Web/HTML/Reference/Elements/svg which doesn't resolve
External URLs (9)

URL: /en-US/docs/Glossary/Contentful_paint
Title: Contentful paint


URL: /en-US/docs/Glossary/First_contentful_paint
Title: First Contentful Paint (FCP)


URL: /en-US/docs/Glossary/Soft_navigation
Title: Soft navigation


URL: /en-US/docs/Web/API/InteractionContentfulPaint
Title: InteractionContentfulPaint


URL: /en-US/docs/Web/API/PerformanceSoftNavigation
Title: PerformanceSoftNavigation

(comment last updated: 2026-08-12 11:20:50)

@tunetheweb

Copy link
Copy Markdown
Contributor Author

@mmocny could you review for technical accuracy?

@tunetheweb

Copy link
Copy Markdown
Contributor Author

@chrisdavidmills as discussed

@sideshowbarker
sideshowbarker requested review from chrisdavidmills and removed request for a team and sideshowbarker August 8, 2026 00:15

@chrisdavidmills chrisdavidmills left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice work, @tunetheweb, this generally makes sense. I've left quite a few comments, but most of them are fairly minor language nitpicks.

Comment thread files/en-us/web/api/interactioncontentfulpaint/index.md Outdated
Comment thread files/en-us/web/api/interactioncontentfulpaint/index.md Outdated
Comment thread files/en-us/web/api/interactioncontentfulpaint/index.md Outdated
Comment thread files/en-us/web/api/interactioncontentfulpaint/index.md Outdated
Comment thread files/en-us/web/api/interactioncontentfulpaint/index.md Outdated
Comment thread files/en-us/web/api/performancesoftnavigation/presentationtime/index.md Outdated
chrisdavidmills

This comment was marked as duplicate.

@tunetheweb

Copy link
Copy Markdown
Contributor Author

Thanks very much @chrisdavidmills for the detailed review and spotting those errors!

I think I've addressed all the feedback. I've left a couple of comments open in case you wanna discuss those further.

Ready for another look.

@mmocny mmocny left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of good new content!

I spotted a few small grammar issues, but I wonder if AI reviewer would spot more. I didn't try.

Comment thread files/en-us/web/api/interactioncontentfulpaint/navigationid/index.md Outdated
Comment thread files/en-us/web/api/interactioncontentfulpaint/index.md Outdated
Comment thread files/en-us/web/api/interactioncontentfulpaint/index.md Outdated
Comment thread files/en-us/web/api/performancesoftnavigation/index.md Outdated

@chrisdavidmills chrisdavidmills left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, @tunetheweb, this is pretty close now. I've left a few more comments on the new content you added last time around.

Comment thread files/en-us/glossary/contentful_paint/index.md Outdated
Comment thread files/en-us/glossary/contentful_paint/index.md Outdated
Comment thread files/en-us/glossary/contentful_paint/index.md Outdated
Comment thread files/en-us/glossary/contentful_paint/index.md Outdated
Comment thread files/en-us/glossary/contentful_paint/index.md Outdated
Comment thread files/en-us/glossary/first_contentful_paint/index.md Outdated

The **`getLargestInteractionContentfulPaint()`** method of the {{domxref("PerformanceSoftNavigation")}} interface returns the current largest {{domxref("InteractionContentfulPaint")}} relevant to this soft navigation.

Some {{Glossary("SPA", "Single Page Applications (SPAs)")}} may paint first, and update the URL afterwards. When measuring {{Glossary("Largest contentful paint", "Largest Contentful Paint (LCP)")}} for {{Glossary("Soft navigation", "soft navigations")}} developers will want to include these paints, despite them happing before the URL updates. Since developers will not know if an interaction and a paint, may also result in a URL update and so a soft navigation, they would need to measure and buffer all `InteractionContentfulPaint` entries.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Some {{Glossary("SPA", "Single Page Applications (SPAs)")}} may paint first, and update the URL afterwards. When measuring {{Glossary("Largest contentful paint", "Largest Contentful Paint (LCP)")}} for {{Glossary("Soft navigation", "soft navigations")}} developers will want to include these paints, despite them happing before the URL updates. Since developers will not know if an interaction and a paint, may also result in a URL update and so a soft navigation, they would need to measure and buffer all `InteractionContentfulPaint` entries.
Some {{Glossary("SPA", "Single Page Applications (SPAs)")}} may paint first and update the URL afterwards. When measuring {{Glossary("Largest contentful paint", "Largest Contentful Paint (LCP)")}} for {{Glossary("Soft navigation", "soft navigations")}}, developers will want to include these paints despite them happening before the URL updates. Since developers will not know if an interaction and a paint will also result in a URL update and therefore a soft navigation, they would need to measure and buffer all `InteractionContentfulPaint` entries.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmocny suggested changes to this text so changed it to this:

Some {{Glossary("SPA", "Single Page Applications (SPAs)")}} may paint first, and update the URL afterwards. When measuring {{Glossary("Largest contentful paint", "Largest Contentful Paint (LCP)")}} for {{Glossary("Soft navigation", "soft navigations")}}, developers will want to include these paints, despite them happening before the URL updates. Because any interaction with any paints could in theory also lead to a URL update and thus soft navigation at any point in the future this could be difficult to measure without potentially saving a temporary reference to every interaction's LCP, should it be needed.

Let me know if you've any further changes.

Comment thread files/en-us/web/api/performancesoftnavigation/index.md Outdated

@chrisdavidmills chrisdavidmills left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, @tunetheweb, a couple of last minute wording suggestions for the last round of changes.

If you are happy with these (and @mmocny is happy), then I'm happy.

Comment thread files/en-us/web/api/interactioncontentfulpaint/largestcontentfulpaint/index.md Outdated
tunetheweb and others added 3 commits August 12, 2026 12:18
…ulpaint/index.md

Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>
…ctioncontentfulpaint/index.md

Co-authored-by: Chris Mills <chrisdavidmills@gmail.com>

@chrisdavidmills chrisdavidmills left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tunetheweb, awesome, approving.

I'll just hold off on merging until @mmocny gives us an LGTM, too.

@mmocny

mmocny commented Aug 12, 2026

Copy link
Copy Markdown

LGTM, thanks for the updates! (I dont have access to formally Approve the PR)

@chrisdavidmills

Copy link
Copy Markdown
Contributor

LGTM, thanks for the updates! (I dont have access to formally Approve the PR)

No worries, this is perfect. Let's do this!

@chrisdavidmills
chrisdavidmills merged commit 3f058f2 into mdn:main Aug 12, 2026
9 checks passed
@tunetheweb

Copy link
Copy Markdown
Contributor Author

Gahhh just spotted this:

image

Fix here: #45106

Comment on lines +27 to +32
}
});
observer.observe({ type: "interaction-contentful-paint", buffered: true });

## Specifications

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, malformed Markdown in a few files (has been fixed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:Glossary Glossary entries Content:WebAPI Web API docs size/l [PR only] 501-1000 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants