Sub topic 11
Crawling JavaScript-dependent pages with rendering
This chapter assumes you have run a first crawl, can read the Internal tab, and know how to open Configuration settings. You should also know the difference between raw HTML and the page a browser shows.
Why rendering matters
By default the SEO Spider runs in Text Only mode. It downloads the raw HTML and reads the links, titles and directives in it. Many modern sites build content in the browser with JavaScript. For those sites, the raw HTML may contain only an empty container, so a Text Only crawl finds one page and almost no links.
Rendering mode loads each page in an embedded headless Chromium browser, runs the scripts, and then reads the final DOM (the page structure after scripts have run). Search engines such as Google also render pages, so this shows you something closer to what they index.
Turning rendering on
- Open Configuration > Spider > Rendering.
- Change the dropdown from Text Only to JavaScript.
- Leave the AJAX timeout at its default (5 seconds) unless content loads slowly.
- Set the viewport to Googlebot Mobile: Smartphone, or another device size.
- Tick Store HTML and Store Rendered HTML if you want to compare them later.
- Re-run the crawl. A mode change does not apply to URLs that are already crawled.
Rendering is slower and uses more memory, because every page runs a full browser. Use it only when the site needs it.
Deciding if you need it
Crawl a few pages in Text Only mode first. Signs that rendering is needed:
- The crawl ends after very few URLs.
- Internal links are missing from the Inlinks and Outlinks data.
- Titles, headings or body text are blank in the crawl but visible in the browser.
Verifying the rendered output
Select a URL, then open the lower pane to view these tabs:
- View Source with the Rendered HTML option shows the raw and rendered HTML side by side.
- Rendered Page shows a screenshot, so you can spot blocked or missing content.
- The JavaScript tab lists filters such as "Pages with Blocked Resources", "Contains JavaScript Links" and "Page Title Only in Rendered HTML".
Pay attention to the filters showing content or links that exist only after rendering. Those are the elements that depend on a search engine rendering the page successfully, and they can be indexed late or not at all.
Common mistakes
- Leaving rendering on for a large site and running out of memory. Consider database storage mode for big crawls.
- Judging a page by the screenshot alone. Always check the rendered HTML, because the screenshot may hide text that is present in the DOM.
- Setting the AJAX timeout too low, which captures a half-built page.
Exercise
A crawl in Text Only mode returns one URL, yet the live site has hundreds of pages reachable through menu links. What setting do you change, and how do you confirm that it worked?
Show answer
Change Configuration > Spider > Rendering from Text Only to JavaScript and re-run the crawl. To confirm, check that the URL count rises, that the Outlinks of the home page now include the menu links, and that View Source with Rendered HTML shows those links in the DOM.