Skip to content

Question : SEO , Robots #490

Closed
Closed

Description

@leobenkel

Hello,

I am curious as to the behavior of this in term of SEO and how google bot, for instance, would see the page.

Let's say I do something simple like:

{ isVisible ? <div>...</div> : null }

in my React component.

Will the bot be able to see the element ? Is everything considered "visible" for the bot ?

Thank you !

Activity

  1. thebuilder commented on Jul 9, 2021

    @thebuilder
    Owner

    As a general rule, no - It won't be seen. But Google Bot does load and execute the page, including JS. So it could in theory detect your element.

    If it it actual content on your page, consider changing the approach you use to show it. It should always be added to the DOM, but hidden with opacity: 0. This will allow you to animate the element in to view, and also avoid page reflow/jumping content.

    See triggering animations for an example:
    https://github.com/thebuilder/react-intersection-observer/blob/master/docs/Recipes.md#trigger-animations

  2. leobenkel commented on Jul 9, 2021

    @leobenkel
    Author

    Yes, I am using the opacity already. I wanted to double check the details related to SEO :)

  3. Repository owner locked and limited conversation to collaborators on Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions