top of page
  • Writer's pictureBrent Payne

Meta Description only in the rendered HTML

The URL being examined has a meta description that is not found within the initial HTML response but only becomes apparent once JavaScript is executed on the page.

Why is this important?

As per Google's documentation, utilizing JavaScript to implement or alter a meta description is permissible:

<script>  document.querySelector('meta[name="description"]').setAttribute("content", "New description content set by JavaScript");</script>    

Nevertheless, this method is not the most effective for presenting content to search engines.

Web rendering is a demanding process that requires more time compared to the retrieval of raw source HTML. Google, therefore, approaches crawling in two phases: an initial scan of the HTML response and a subsequent rendering of the page for a deeper analysis. The index is updated after this second evaluation.

This implies that URLs might temporarily be indexed based on the 'first look', creating a period where the 'second look' reflects in the index updates.

Thus, it's crucial that the initial HTML response includes all vital elements, such as the meta description, to ensure they are indexed properly.

Otherwise, the lack of a meta description in the HTML response means Google might generate one based on the page content post-render, which isn't ideal if the content is frequently updated, leading to outdated index information.

What does the Optimization check?

This Optimization is activated by any internal URL that features a meta description in the HTML post-render that isn't present in the initial HTML response.

Examples that trigger this Optimization

Here's an instance where the Optimization would trigger; if the initial HTML response looked like this:

<!doctype html><html lang="en"><head>  <meta name="robots" content="index,follow">  ...</head><body>...</body></html>    

And the post-render HTML contained this:

<!doctype html><html lang="en"><head>  <meta name="description" content="An engaging description of the page content">  <meta name="robots" content="index,follow">  ...</head><body>...</body></html>    

How do you resolve this issue?

Relying on JavaScript for primary page content elements is not advised, as it may lead to incorrect indexing or delays. Google might also encounter issues comprehending and executing JavaScript.

The meta description is a significant element that should be promptly available upon Google's initial page examination.

To remedy the issue, collaborate with developers to ensure the meta description is integrated into the HTML response and remains unchanged during the rendering process.

Further Reading


Recent Posts

See All

ClubReq Gets A Link (Because They Asked)

I am a mentor for Techstars and have been for over 10 years. In those ten years I have mentioned to startups to ask ANYONE and everyone that they meet to link to their site. Yet, in all those times on


bottom of page