Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Google Won't Index Javascript Content That Requires a Click to Access

         

engine

3:29 pm on Nov 5, 2015 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Google's Gary Illyes reminded us that Google won't index any content in a javascript array that requires a click to access.

[twitter.com...]

lucy24

6:27 pm on Nov 5, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



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)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



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)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



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)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



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