1. Google Search Console URL Inspection Tool
2. Google Rich Results Test
3. Chrome Dev Tools
Easy JavaScript Debugging
Both of the first two tools let you submit a URL that gets immediately crawled by Google and they’ll show you the rendered page, what the page looks like for Google for indexing purposes.
Martin explains the usefulness of the JavaScript console messages in Chrome Dev Tools:
“There’s also more info that gives you very helpful details about what happened in the JavaScript console messages and what happened in the network. If your content is there and it’s what you expect it to be, then it’s very likely not going to be JavaScript that is causing the problem. If people were doing just that, checking these basics, 90% of the people showing up in my inbox would not show up in my inbox. That’s what I do.”
He also explained that just because the JavaScript console flags an error that doesn’t mean that the problem is with the JavaScript itself. He uses the example of an error in how JavaScript failed to execute that was caused by an API that’s blocked by Robots.txt, preventing the page from rendering.
Why Do So Many SEOs Blame JavaScript?
Martin implies that not knowing how to debug JavaScript is the cause of the reputation it’s received as a cause of crawling and indexing issues. I get it, I learned the basics of coding JavaScript by hand 25 years ago and I disliked it then and now, it’s never been my thing.
But Martin’s right that knowing a few tricks for debugging JavaScript will save a lot of wasted time chasing down the wrong problem.
Watch Martin Splitt’s presentation here:
Maybe It Isn’t JavaScript – Martin Splitt at SearchNorwich 18
Featured Image by Shutterstock/Artem Samokhvalov