Google Search Console – you don’t see what you get.
Life tended to get easy with the first outcome of WYSIWYG – technology: no suprises when seeing the rendered result of the work. With this premise we consulte Google every day to get a sense of how it works under the hood when it comes to crawling and indexing our web pages.
Google Cache
Some of you probably check Googles „In Cache“ option in the SERPs to get a clue of how Google saw the page at crawling time. This is close enough as long as you have no significant JavaScript inside the page. But as soon as you have a heavely scripted page, be aware: Google cache only shows the pure HTML content as it has been the time the crawler came along! This in particular means, that everything else, like images and JavaScript, is freshly rendered every time you see it – with all changes that occur!
Fetch as Google
Ever checked „Fetch as Google“ to see if your dynamic JavaScript is actually fetched by Google? Sure you did! You will be surprised to know that the screenshot you see there easily differs from what Google really crawls and puts into the index. Time to see a proof. I prepared a part of the page with JavaScript that renders some content and then changes it after 5 seconds. So the content changes after just 5 seconds. Now let’s see, what I actually see from it.
The part of the site the moment DOM is ready
Same part of the site 5 seconds later – you see the change?
This is what „Fetch as Google“ sees
This is what Google really puts in the index – see the difference?
We sum up
„Fetch as Google“ generates a screenshot the minute the DOM is ready. Everything that has been rendered until then, will come with the screenshot. But content that appears just seconds later, maybe because there was a slow server delivering it, will not be visible with the screenshot.
The more important indexing however, will take care of delayed content because it obviously takes care of any delay caused by setTimeout or asynchronous AJAX content. Here you will find what the screenshot does not unveils.
There is this and others signals from Google that they do not want you to see too munch from what they do and how it works. You mainly get some hints that may change their meaning down the road. So take care, because when it comes to Google, WYSINWYG*.
* WYSINWYG What You See Is Not What You Get