Check 08.15 · JavaScript and HTML rendering

Test which information is accessible without JS

Check page by page that text, prices, links and SEO tags stay readable without JavaScript, using curl, Chrome, Screaming Frog and an automated test.

Priority
Critical
Difficulty
Easy
Estimated time
1 to 3 h, then automated
Free, no account: your progress is saved in this browser.

Ask an AI to check this point on your site

Opens the assistant with a ready-made question: this check, its goal and your site URL.

For Gemini, Copilot or another assistant, copy the question. The link opens the chosen service directly: nothing goes through this site.

In short

Testing without JavaScript means looking at a page the way crawlers that do not run scripts receive it: the raw HTML sent by the server. This check consists of listing the critical information on each template (title, main text, price, contact details, links, SEO tags), checking that it is present without JavaScript, then fixing or knowingly accepting each gap. The deliverable is a checklist table per template, ideally rerun automatically on every release.

Why it matters

Three categories of readers depend on the initial HTML:

  • Generative engine crawlers: according to the analysis Vercel published in December 2024, the OpenAI, Anthropic and Perplexity crawlers did not execute JavaScript, unlike Googlebot and Applebot. Whatever is missing from the initial HTML does not exist for them and cannot be cited.
  • Google, for control tags: Google renders JavaScript, but when it finds a noindex tag in the initial HTML, it may skip rendering and JavaScript execution. A noindex removed by a script may therefore never be seen as removed.
  • Visitors whose scripts fail: unstable network, blocker, error in a file, older browser.

In practice, link previews in messaging apps and on social networks also rely on the tags present in the initial HTML.

Not everything has to work without JavaScript: a cart, a configurator or an interactive map can depend on it. The test is there to check that the information itself is available.

What it improves

  • Readability by AI crawlers Content that can be cited is in the initial HTML. No practice guarantees a citation.
  • Indexing by Google Less dependence on rendering, and control tags that are consistent from the initial HTML onwards.
  • Discovery Links that can be crawled even without rendering.
  • Robustness A JavaScript error no longer makes the content disappear.
  • Rankings No direct effect.

How to check

Three five-minute checks on an important page:

curl -s https://example.com/produits/theiere-fonte/ | grep -o -E '<(title|h1)[^>]*>[^<]*' 
curl -s https://example.com/produits/theiere-fonte/ | grep -c "89.00"
curl -s https://example.com/produits/theiere-fonte/ | grep -o -E '<meta name="robots"[^>]*>|<link rel="canonical"[^>]*>'

Then, in Chrome, open the developer tools and the Command Menu (Ctrl+Shift+P, or Cmd+Shift+P on Mac), type “javascript” and choose “Disable JavaScript”. Reload the page: JavaScript stays disabled in this tab as long as the developer tools are open.

Compliant result: the title, the H1, the main text, the price and the navigation links are present in both cases, and the robots and canonical tags have the same values as in the rendered page.

How to implement

Step 1 — List the critical information per template

Choose one representative URL per template (home page, category, product page, article, local page, contact page) and, for each one, the information that must be readable without scripts:

Template URL tested Critical information Expected value
Product page /produits/theiere-fonte/ H1 Cast iron teapot, 1.2 L
Product page /produits/theiere-fonte/ Price €89.00
Product page /produits/theiere-fonte/ Link to the category href="/theieres/"
Article /blog/choisir-theiere/ First paragraph A cast iron teapot retains heat
Store page /magasins/lyon/ Address 12 rue de la Charité
All Each URL Robots tag Absent or index, follow

Always add the title, the meta description, the canonical, the robots tag, structured data and, for a multilingual site, the hreflang tags.

Step 2 — Check the initial HTML with a script

Save the table in a controles.csv file (one line per check, semicolon as separator):

https://example.com/produits/theiere-fonte/;Cast iron teapot, 1.2 L
https://example.com/produits/theiere-fonte/;€89.00
https://example.com/produits/theiere-fonte/;href="/theieres/"
https://example.com/magasins/lyon/;12 rue de la Charité

Then run this script:

#!/usr/bin/env bash
# Usage: ./controle-sans-js.sh controles.csv
while IFS=';' read -r url attendu; do
  if curl -s -L "$url" | grep -q -F -- "$attendu"; then
    echo "FOUND    $url  $attendu"
  else
    echo "MISSING  $url  $attendu"
  fi
done < "$1"

Check a MISSING result by hand before drawing conclusions: the HTML may contain the value in another form (an &eacute; entity, a non-breaking space inside the value, text escaped in JSON). In that case, search for a shorter fragment.

Step 3 — Browse the site without JavaScript

With JavaScript disabled (Chrome as above, or javascript.enabled set to false in about:config in Firefox), browse each template and note:

  • Content: text, prices, reviews, FAQ, tabs and accordions whose content must stay in the HTML;
  • Navigation: menu, breadcrumb, pagination, links to related products or articles;
  • Images: an image lazy-loaded through a data-src attribute stays empty without scripts, whereas loading="lazy" works;
  • Obstacles: a consent banner or a loading screen that covers the page and cannot be closed.

Step 4 — Crawl the site without rendering

By default, Screaming Frog crawls in text-only mode, meaning without executing JavaScript. A crawl in this mode shows what a crawler without rendering discovers: compare the number of URLs found with the number in your sitemap. With a licence, JavaScript rendering mode (Configuration > Spider > Rendering > JavaScript) compares the initial and rendered HTML and populates the JavaScript tab, whose “Contains JavaScript Content”, “Contains JavaScript Links” and “Noindex Only in Original HTML” filters answer the question directly.

Without a paid tool, the script from step 2 and a sample of pages per template are enough for most sites.

Step 5 — Compare with what Google sees

For the gaps you found, open URL Inspection, run “Test live URL” and look at the tested page's HTML. If the information is there, Google sees it, but crawlers without rendering do not. If it is not there, the problem affects Google too: see test rendering in Search Console (opens in a new tab).

Step 6 — Decide on each gap

Missing without JavaScript Decision
Main text, H1, price, availability, contact details Fix: server rendering or prerendering (prefer SSR/SSG (opens in a new tab))
Navigation links, pagination, related products Fix: <a href> links in the HTML (make links available in HTML (opens in a new tab))
Title, description, canonical, robots, hreflang Fix: final values in the initial HTML (check title, description and canonical after rendering (opens in a new tab))
Structured data Fix: JSON-LD generated on the server side (check rendered structured data (opens in a new tab))
Images loaded by a script Native loading="lazy", or a fallback image in <noscript>
Cart, account, filters, configurator, map Accept, if the information they show also exists as text
Reviews, recommendations, third-party widgets Depending on their value: a summary in the HTML is often enough

Record the decision and the person responsible in the table from step 1.

Step 7 — Automate the check

With Playwright, a browser context can disable JavaScript. This test fails if critical information disappears from the initial HTML:

// tests/sans-js.spec.ts
import { test, expect } from '@playwright/test';

test.use({ javaScriptEnabled: false });

test('the product page stays readable without JavaScript', async ({ page }) => {
  await page.goto('https://example.com/produits/theiere-fonte/');

  await expect(page.locator('h1')).toHaveText('Cast iron teapot, 1.2 L');
  await expect(page.getByText('€89.00')).toBeVisible();
  await expect(page.locator('a[href="/theieres/"]').first()).toBeAttached();
  await expect(page.locator('meta[name="robots"][content*="noindex"]')).toHaveCount(0);
});

Run it against the staging environment before each release. See integrate SEO tests into CI/CD (opens in a new tab).

Common mistakes

  • Looking at the Elements tab in the developer tools: it shows the rendered DOM, not the initial HTML. Use view-source: or curl.
  • Testing a single page: each template has its own script-loaded components.
  • Settling for “the page displays”: a page can display without JavaScript with an empty menu and no price.
  • Requiring everything to work without JavaScript: the cart and the configurator can depend on it; the information cannot.
  • Forgetting control tags: a noindex present in the initial HTML and removed by a script can lead Google not to render the page.
  • Testing with a logged-in session or cookies: crawlers arrive without cookies. Test in a private window or with curl.

Frequently asked questions

Does my site need to work entirely without JavaScript?

No, a site does not need to work entirely without JavaScript. The cart, filters, a configurator or an interactive map can depend on it. What must remain readable without scripts is the information: title, main text, price, availability, contact details, navigation links and SEO tags. That is what crawlers that do not execute JavaScript read, including most AI crawlers.

Does Google still need the initial HTML if it executes JavaScript?

Yes, Google uses the initial HTML too. It discovers links there before rendering, and when it finds a noindex tag there, it may skip JavaScript execution: a noindex removed by a script may never be seen as removed. The initial HTML is also the only version read by crawlers that do not execute JavaScript, including those of several generative engines.

How do I disable JavaScript in Chrome to test a page?

To disable JavaScript in Chrome, open the developer tools, then the Command Menu with Ctrl+Shift+P, or Cmd+Shift+P on Mac. Type “javascript”, choose “Disable JavaScript”, then reload the page. JavaScript stays disabled in this tab as long as the developer tools remain open. To see exactly the HTML sent by the server, also use view-source: or curl.

Do the ChatGPT, Claude and Perplexity crawlers execute JavaScript?

According to the analysis Vercel published in December 2024, the OpenAI, Anthropic and Perplexity crawlers did not execute JavaScript, whereas Googlebot and Applebot do. These companies do not document this point themselves, and their crawlers may change. The precaution remains the same: put the content to be cited, prices and links in the HTML sent by the server.

Updated on

Topic checklist (PDF)

And now?

In the “JavaScript and HTML rendering” topic

  1. Inspect the initial HTML
  2. Compare initial HTML and rendered DOM
  3. Test rendering in Search Console
  4. Prefer SSR/SSG for critical content if relevant
  5. Make content accessible without user interaction
  6. Make links available in HTML with href
  7. Avoid links that rely solely on JS events
  8. Check title, description and canonical after rendering
  9. Check rendered structured data
  10. Fix JS and hydration errors
  11. Check content loaded via API
  12. Check dynamic pagination
  13. Check SPA HTTP status codes
  14. Avoid information available only in Canvas
  15. Test which information is accessible without JS