7

Will the Googlebot index a webpage on "page load" or after the "page ready" state. The reason I'm asking is because I'm trying to change my h1 and h2 tags using jQuery on page Load.

2
  • It might be helpful if you add some more details about your code.
    – dan
    May 29, 2015 at 6:52
  • Check the "Fetch and Render" tool in Google Search Console (aka GWT).
    – MrWhite
    May 29, 2015 at 12:02

3 Answers 3

3

Google indexes the text after the page is fully ready. I have a password creation site that uses JavaScript to write random passwords into the page on jQuery's $(document).ready. Googlebot was indexing those randomly generated passwords.

I've previously asked how to prevent that indexing because random passwords aren't text that should be indexed: How do I prevent Google from indexing text that is generated by JavaScript?

2

An article I'd read earlier this month revealed tests that have seen Googlebot execute Javascript and process the resulting Document Object Model (DOM), rather than simply looking at the HTML source code, you might find this a helpful read:

SearchEngineLand: Tested Googlebot Crawls Javascript (May 2015)

-4

It doesn't matter. Google reads your markup and doesn't render the content. If they read your javascript, then they can tell if its manipulating those headings, no matter when it happens.

13
  • 1
    "doesn't render the content" - Google provides the "Fetch and Render" tool for this very purpose.
    – MrWhite
    May 29, 2015 at 12:12
  • Yes but that's for the developer, not for Google's sake. Search engines need not render content to understand it.
    – Rob
    May 29, 2015 at 12:16
  • 1
    "not for Google's sake"? The tool is provided to give you a very good idea of what the search engine is going to be able to index. Google is not going to index content that does not at some point appear on the rendered page as users are not going to see it either - bad experience all round.
    – MrWhite
    May 29, 2015 at 12:20
  • @w3d You just repeated what I said. The tool is for your use, not Google's.
    – Rob
    May 29, 2015 at 12:25
  • 2
    This answer is factually incorrect. Google is now indexing content that is only rendered by JavaScript and not in the page source. I've had to ask how to prevent it from doing so. May 29, 2015 at 13:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.