strapdown icon indicating copy to clipboard operation
strapdown copied to clipboard

How having `display:none;` on all the text makes this `Search-engine friendly`?

Open dzek69 opened this issue 6 years ago • 1 comments

Hiding text on page may be considered a black-seo, because in theory it may cause search engines to point to our website for irrevelant queries.

Hiding small subset of text on a page probably won't hurt - we may want to hide something, like submenus, "more details" of a section or something, and we all do that for years and nobody got hurt because of that.

But hiding bigger parts of text may be considered as we want to get users on our page even if it does not provide what we are looking for.

Hiding ALL the text scares me as I think this is an easy way to get banned or punished by search engine.

I could live without new website being banned (or just drastically lowered) in the search engine - I'd switch the to new domain and engine used for generating my website - not much effort yet, so the switch is easy. But I'd be disappointed to have nicely ranked webpage to which I'd add Strapdown just to get it banned. It's hard to rebuild reputation.

A note on javascript execution of search engines:

  1. Google usually does execute javascript. But we can't take this for granted. Sometimes Google indexes just first JS execution loop changes on DOM, sometimes it indexes some async changes (both simple timers and ajax calls). Nothing is guarranted though.
  2. Google isn't the only search engine. While Bing and Duck Duck Go may not be as relevant - Yandex for example is very popular search engine in Russia and some other (mostly using cyrylic alphabet) countries. Even if somehow hiding all the text and replacing it with JavaScript IS "search-engine friendly" for Google - it may be not for others.

So, to sum it up:

  • Docs would need to some argumentation to prove this point or I'd suggest to remove this point. Or just leave it as "unknown" and link to some research, so people can think themselves if they want to use it, without being deceived by assumptions that may not be true.
  • I think that leaving the source text before the scripts replace it with HTML version is not that bad. It would be much safer for SEO, the text is available to read faster, it's still readable without javascript.

I'd like to hear other people thoughs (and Strapdown author) on this topic.

dzek69 avatar Jun 16 '18 17:06 dzek69

I've been using Strapdown.js recently. (It is currently 2021. It's been years)

What I can clarify is that Google still successfully displays in search results: https://www.google.com/search?q=strapdown.js

When you search for Strapdown.js, https://strapdownjs.com/ will appear in the search results.

However, in practice this code style="display:none;" can be omitted. It does not exist in .html in this derived project: https://github.com/Naereen/StrapDown.js

This code hides the momentary pre-conversion display. You can delete it. I like it too: https://github.com/fu-sen/strapdown.js.balloon.net.eu.org

fu-sen avatar Mar 25 '21 02:03 fu-sen