Martin Splitt, Google’s Search Developer Advocate, explained that websites range from simple pages to complex applications. It’s important to balance JavaScript use with making key content available in the initial HTML.
John Mueller, another Google Search Advocate, agreed, noting that developers often turn to JavaScript when simpler options, like static HTML, would be more effective.
What To Do Instead
Developers and SEO professionals should ensure structured data is accessible to all crawlers to avoid issues with AI search crawlers.
Here are some key strategies:
Server-Side Rendering (SSR): Render pages on the server to include structured data in the initial HTML response.
Static HTML: Use schema markup directly in the HTML to limit reliance on JavaScript.
Prerendering: Offer prerendered pages where JavaScript has already been executed, providing crawlers with fully rendered HTML.
These approaches align with Google’s advice to prioritize HTML-first development and include important content like structured data in the initial server response.
Why This Matters
AI crawlers will only grow in importance, and they play by different rules than traditional search engines.
If your site depends on GTM or other client-side JavaScript for structured data, you’re missing out on opportunities to rank in AI-driven search results.
By shifting to server-side or static solutions, you can future-proof your site and ensure visibility in traditional and AI searches.
Featured Image: nexusby/Shutterstock