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
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
— Gary Illyes (@methode) November 4, 2015
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.
Jennifer Slegg
Latest posts by Jennifer Slegg (see all)
- 2022 Update for Google Quality Rater Guidelines – Big YMYL Updates - August 1, 2022
- Google Quality Rater Guidelines: The Low Quality 2021 Update - October 19, 2021
- Rethinking Affiliate Sites With Google’s Product Review Update - April 23, 2021
- New Google Quality Rater Guidelines, Update Adds Emphasis on Needs Met - October 16, 2020
- Google Updates Experiment Statistics for Quality Raters - October 6, 2020
Ethan says
I understand why this is the case with arrays, however I’ve been looking for a more detailed, recent answer to collapsible text. How are Javascript solutions handled vs. HTML5’s and tags? For example, is the visible summary given greater weight and by how much?