Good. Why would a site want to do something that enrages the user? ("The search engine claimed I would find suchandsuch on the page, but I don't see it anywhere, dammit, not even when I deploy the browser's Find function. I'm outta here.")
engine
6:49 pm on Nov 5, 2015 (gmt 0)
Some people don't do it to enrage a user, but do it to hide extensive content which, perhaps, would fill the whole page. Or, perhaps they are user comments and reviews which they don't want indexed. So it does work both ways.
FranticFish
7:57 pm on Nov 5, 2015 (gmt 0)
I do have to say then that it puzzles me exactly WHY Google insists on seeing your CSS and Javascript files (on pain of penalty) when they seem to have very little idea how to deal with them.
We don't render AJAX content. We insist on seeing it nonetheless.
I personally think there's a real logic gap in the 'if it's not visible onLoad it doesn't exist' school of thought.
aakk9999
12:52 pm on Nov 6, 2015 (gmt 0)
It is interesting that Gary Illyes said that CSS onclick was fine and Google would index the content, but JS onclick was not.
It appears that JS on mouse over is fine though. I have done some tests - I have a page that reveals some content on mouse over using Javascript. What I have found out is: - the page ranks #1 when searching for the exact text that reveals itself on hover - however, the snippet shown by Google in SERP in that case does not show the sentence searched for in bold, instead it shows some other unrelated sentences from the page