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.

dan
  • 15,153
  • 11
  • 46
  • 52

3 Answers3

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?

Stephen Ostermiller
  • 99,822
  • 18
  • 143
  • 364
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)

richhallstoke
  • 3,053
  • 13
  • 26
-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.

Rob
  • 4,619
  • 2
  • 22
  • 25