1

I have found out from Google's Javascript SEO video, that Goodle indexes webpages in 2 waves and the second wave which involves content generated with Javascript is slower and less frequent.

I have an idea to tackle this issue:

  1. I will call/incule the API (I will get the Parameters by changing it to pretty URL) in the current page's backend and print the data in plain text inside a div. This will make google crawlers get its hands on the content in the first wave itself.
  2. Then once JS is loaded, I will call that particular API again and this time I will replace the previously created div and render all the data recieved from the API once again.

My questions:

A. Is it SEO friendly? Or Google will penalise this practice? B. Will it solve the late indexing issue or am I being an idiot? C. Are there more pros than cons or vice versa?

1

To answer your questions:

A. There's no reason to believe that Google should penalize this. JavaScript is used to replace placeholder content all the time on the internet.

B. Yes, this should solve the late indexing issue. Google will crawl the page and see the plaintext, then later crawl the page again and should see and index the JS generated content.

C. One con is just the maintenance cost of needing to wrangle both backend and frontend code. A second con is that if it's a large amount of data, users are effectively loading it from the server twice, using more bandwidth.

Ideally, you would want to have the data loaded into the page by the backend, then the JavaScript would use the data that's already on the page instead of fetching it a second time from the server. But I know that's not feasible in all cases.

Personally, if it were my site I would consider whether the data is so important to the page that you think Google will base its ranking decision on it (considering that on-page content is only one of many signals that Google uses to rank). In other words this setup may or may not be worth the effort, that's something to test.

| improve this answer | |
  • 1
    Thank you for your answer. The reason I was doubting that Google might penalise this practice is to take down the shady sites out there who would try to index some safe content first and would bombard the user with harmful/unsollicited content upon visit. Thanks for the tip of using the already recieved content in the JS render instead of calling the API again, will try to make that happen. The data here is very important but it will not change as frequently. I'm just trying to beat the competitions by any legal means neccessary. I will wait for sometime before marking ur answer correct. – Roy May 30 at 5:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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