JavaScript Rendering and Indexing
JavaScript Rendering is the process by which a search bot executes the scripts on a page to see content that is not present in the original HTML. Google can do this, but it does so in two stages and not instantly; other bots and parsers do not always have this capability.
How It Happens
- The bot downloads the original HTML and immediately indexes what is present in it.
- The page enters a queue for rendering.
- When it reaches the front of the queue, the scripts are executed and the index is updated.
Between the first and third steps, it can take from hours to weeks. For news and rapidly changing pages, this is critical; for others, it is tolerable.
When Problems Arise
| Situation | Risk |
|---|---|
| All content is loaded by a script | Indexing delay, sometimes loss of part of the text |
| Links are made not with the a tag, but with a click handler | The bot does not follow them — pages are not found |
| Content appears after user action | The bot will not see it: it does not click |
| Scripts are blocked in robots.txt | Rendering is impossible |
| The script fails on a slow connection | The page is indexed as empty |
How to Check Your Page
The simplest way is to disable JavaScript in the browser and open the page: what remains is what the bot sees immediately and certainly. The second way is to compare the original page code with the rendered tree in the developer tools. If critical text and links are only in the second — there is something to think about.
What to Do
Do not abandon JavaScript, but keep the main elements in the original HTML: text, headings, internal links, and metadata. Everything else can load in any way. For large sites, server-side rendering or pre-generating pages is usually applied.
Other Bots Have Less Capability
The Google bot renders pages, but many others — social media crawlers, link preview gatherers, some AI agents — only read the original HTML. If the title and description appear on the page via a script, the link to your site in a messenger will appear as an empty card.