X
    Categories: GoogleSEO

Warning About Contents in a JavaScript Array & Indexing in Google

Gary Illyes from Google has taken to Twitter with a technical SEO warning about websites that are using a javascript array to hide content until a visitor clicks to expand.

PSA: If you put contents in a javascript array and only expand them when you click e.g. “…”, those contents won’t be indexed by Google

While it is not “new news”, it does highlight that sometimes webmasters can shoot themselves in the foot when it comes to SEO, simply due to their on-site technical choices, which are far too often made by those who don’t do the site’s SEO, if they even have one.

From a technical point of view, because Google can crawl JavaScript, we do see some content hidden until a user action is done actually be indexed by Google.  But it isn’t a 100% guarantee, and for best practice reasons, it is best not to hide content, unless you intent for it not to be indexed – although then you could be dealing with other spam issues depending on the reasons why you don’t want it indexed.

The following two tabs change content below.

Jennifer Slegg

Founder & Editor at The SEM Post
Jennifer Slegg is a longtime speaker and expert in search engine marketing, working in the industry for almost 20 years. When she isn't sitting at her desk writing and working, she can be found grabbing a latte at her local Starbucks or planning her next trip to Disneyland. She regularly speaks at Pubcon, SMX, State of Search, Brighton SEO and more, and has been presenting at conferences for over a decade.
Jennifer Slegg :Jennifer Slegg is a longtime speaker and expert in search engine marketing, working in the industry for almost 20 years. When she isn't sitting at her desk writing and working, she can be found grabbing a latte at her local Starbucks or planning her next trip to Disneyland. She regularly speaks at Pubcon, SMX, State of Search, Brighton SEO and more, and has been presenting at conferences for over a decade.