Checking Rendered HTML for JavaScript Pages

Hero image for Checking Rendered HTML for JavaScript Pages. Image by Eugene Golovesov.
Hero image for 'Checking Rendered HTML for JavaScript Pages.' Image by Eugene Golovesov.

View source is useful, but it is no longer enough for every page.

On a JavaScriptheavy page, the source may show only the starting point. The browser then runs scripts, fetches data, updates the DOM, changes headings, inserts links, and perhaps writes metadata. If you only inspect the original source, you may miss the page users and crawlers actually have to understand.

Rendered HTML checks close that gap.


Capture the Source and the Rendered DOM

Start with two views of the same URL:

  • the original HTML response
  • the DOM after JavaScript has run

Browser developer tools can show both. Search tooling can also help by showing how a crawler rendered the page.

Source and rendered HTML do not need to be identical. They often will not be. What matters is understanding what changed and whether those changes affect search visibility, accessibility, or core content.


Compare the Document Head

Check the head first:

  • title
  • meta description
  • canonical
  • robots directive
  • Open Graph tags
  • structured data

If JavaScript changes these values after load, confirm that the rendered result is correct. Also ask whether those values could be produced earlier. For public search pages, serverrendered metadata is usually easier to trust and debug.

The article on clientside rendering and search visibility covers why routelevel metadata matters.


Compare Headings and Main Content

Rendered content should have a coherent structure.

Check:

  • one clear primary heading
  • body content present
  • important product or article data rendered
  • no permanent loading placeholder
  • no empty main area
  • no content hidden by default without a clear interaction

The article on optimising HTML markup for SEO is useful here because rendered HTML should still be good HTML.

JavaScript can improve presentation, but it should not leave the document structure vague.


Inspect important links in the DOM.

Cards, menus, pagination, breadcrumbs, and related content should use anchors with href values. If they are buttons or clickable containers, users may still be able to navigate, but discovery is weaker and basic browser behaviour is lost.

This matters especially for JavaScript routers. A router can intercept a normal anchor click without removing the anchor from the document.


Look for Duplicated or Stale Content

Rendered JavaScript can accidentally duplicate content:

  • the server renders a list
  • the client hydrates and appends the list again
  • metadata is inserted twice
  • schema appears from both server and client
  • old route content remains after navigation

These bugs are easy to miss visually because CSS may hide one copy. Inspecting the DOM makes them obvious.


Test Failure States

Rendered HTML checks should include more than a successful fast load.

Try:

  • slow network
  • blocked API request
  • blocked JavaScript file
  • empty data response
  • route reload
  • direct visit to a deep URL

If a direct route visit renders differently from a clientside navigation to that route, the application has an SEO and reliability issue to investigate.


Keep a Record Before Launch

For important pages, save examples of source and rendered output before launch.

This gives the team something to compare if traffic or indexing changes later. It also creates evidence for what was actually shipped, which is much more useful than trying to reconstruct the state from memory.

The same method is useful during migrations. How to compare rendered HTML before and after a migration turns this kind of inspection into a launch and recovery check.


Wrapping Up

Rendered HTML checks are a practical response to JavaScriptdriven pages.

Compare the original response with the DOM after scripts run. Review metadata, headings, content, links, schema, and failure states. If the rendered page is the real page, it deserves the same level of inspection as any serverrendered template.

Key Takeaways

  • View source shows the initial response, not always the final page.
  • Rendered HTML checks should compare metadata, headings, content, links, and schema.
  • Important navigation should render as real anchors with href values.
  • Clientside rendering can duplicate or stale content in the DOM.
  • Save renderedoutput evidence before launch for important pages.

Postscript

This article is part of an archive restored from a previous version of my website on 27 May 2026. The original publication date is accurate. The article has since been restored and lightly edited for formatting, imagery, broken links, and current internal references.


Need a senior engineer involved?

I can work directly in the codebase, review the architecture, or support the team through delivery when the work needs more than extra hands.