4

This question already has an answer here:

If I used lazy loading with Ajax, then am I right in saying that Google will not see the content in the lazy load?

An example is if I have a part of my site featuring products towards the bottom of my homepage, but this section doesn't load until the user scrolls to it. Therefore in the source code of the page this would not be displayed nor would it be displayed in Google's cache.

So is there a trade off with lazy loading? The site will download faster, but loses some optimization? Do you just need to be careful what to choose in the loading?

marked as duplicate by Stephen Ostermiller seo Mar 15 '18 at 13:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

7

In it's very basic form search engines don't crawl content provided by ajax. Google at least gives a lookout on this matter:

In the near term, your site will remain indexed by Google as-is, with many pages likely not fully represented in search results. However, we are continously working to make Googlebot behave more like a browser. As we implement more features, Google may start to index your pages properly without help.

So it's not possible now but maybe in the future. However, there are ways to make ajax crawlable (e.g. HTMLsnapshot) which you can read about here: https://developers.google.com/webmasters/ajax-crawling/docs/getting-started

So back to your questions:

So is there a trade off with lazy loading?

Yes, without some changes this content won't be indexed (unless it is also statically available on your page somewhere, crawlable with the above mentioned changes or available through a sitemap). This obviously can result in a lower ranking (based on the loaded data).

The site will download faster, but loses some optimization?

Not necessarily. The ajax script is still getting executed and loading in the background. The overall load time could be even slower. Lazy load the content that seems to be secondary to the user (there are exceptions to this of course, sometimes even primary information makes sense to load this way)

Do you just need to be careful what to choose in the loads?

That's basically it. Profile the performance and try to figure out if this enriches the user experience.

Once again I can only recommend https://developers.google.com/webmasters/ajax-crawling/ where you can also read about What the user sees, what the crawler sees

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