SEOs are excited about the new lazy loading documentation from Google.
Google has released a new help document aimed at helping webmasters and SEOs ensure their lazy-loading web page content can be crawled, indexed and ultimately ranked in the Google search results. The new document can be found in the Google developer guides over here.
As more and more webmasters and developers look for ways to defer the loading of non-critical or non-visible content on the page until later, i.e. lazy-loading content, it becomes more of a concern for SEOs to ensure those techniques are something that Google can crawl and index. If you implement lazy-loading techniques without thinking of how Google can discover the content that is within the lazy-loading mechanism, then you run the risk of that content not being discoverable within search.
Google outlined that you should ensure the content is loaded within the viewport. Without that, GoogleBot probably won’t see that content as well. In addition, for Google to support infinite scrolling or paginated loading, you must provide a unique link to each section that users can share and load directly. Google recommends using the History API to update the URL when the content is loaded dynamically.
And of course, do not forget to test, test and test. Google recommends using a Puppeteer script to locally test your implementation, which is a Node.js library for controlling headless Chrome.