Hidden or Not – Is content that is not fetched by Google not indexed either? The results…

von Henry Zeitler

Two weeks ago, I set up a litte post and a test case including some more or less common practices of dealing with content on web pages. I wanted to spot if Google changed its mind about crawling hidden or dynamically included content and which of the fetched content will get indexed anyway. Here are the interesting results…

It’ a known fact that if Google is able to fetch content from a server, it doesn’t necessarily mean it wants to index it either. When setting up an UI-element like an accordion menu, Webdesigners unfortunately often use display: none; to hide content. And technics like AJAX-includes are very popular to add content to a page on demand to increase the performance and usability of a webpage.

Google often confuses people by not making distinct statements about which of those approaches are valid and which are not (e. g. Hidden text and links and Ajax). That’s why we need to test it by ourselves from time to time.

The results

For a better understanding of the results below, please open the test case Hidden or Not?.

Technique Fetched? Indexed? Search string
 
Hide content:
CSS | display: none; Yep Yep freizeitler [ACDN]
CSS | visibility: hidden; Yep Nope freizeitler [ACVH]
CSS | text-indent: -999em; Yep Yep freizeitler [ACPA]
 
Include content:
CSS | .foo:after Nope Nope freizeitler [CA]
jQuery | $(".foo").append(); Nope Nope freizeitler [JQA]
jQuery/AJAX | $(".foo").load(); Nope Yep freizeitler [JAX]
Javascript | document.write Nope Yep freizeitler [JDW]

I’m mostly astonished by the fact that content, hidden with display: none; or included with document.write and the jQuery AJAX (load) is actually indexed. It still leaves some important questions unanswered… Does it mean that Google treats an AJAX request triggered with jQuery .load() differently to others? Or is Google indexing an AJAX include that was triggered by $(document).ready but not one that was fired by a click event? What is all this _escaped_fragment_ stuff for, if the content gets indexed anyway with .load()? Btw, jQuery provides different methods to accomplish an AJAX-request. I found a simple overview at stackoverflow. Here, I just considered the .load() function. It’s all surely worth setting up additional testings.

After all, it seems like Google sometimes silently adjusts its algos to popular and widely used technics. I’m not sure if the results are totally valid, reliable for every case and of durable worth but they surely won’t change my mind about using those techniques. Never forget to keep things accessible, and always keep in mind Progressive Enhancement and Graceful Degradation.

I hope these insights are useful for you too. And let’s keep on testing…

comments powered by Disqus