How to Lazy Load Comments in WordPress Blogs

Lazy loading comments in WordPress blogs can increase the site loading speed should you decide to implement it on your WordPress blog. The main advantage of lazy loading comments will be very obvious in blogs with a large number of comments as they significantly increases the loading time of the webpage by increasing the webpage size as well.

Lazy Load WordPress Comments

So how can you lazy load comments? While lazy loading images functionality is well built in the chrome browser as well as in WordPress 5.5. The ability to lazy load comments automatically is still not there by default.

A WordPress plug-in called lazy load comments can make this happen in one click. Once you download and activate this plug-in and optimize settings, it will not load the WordPress comments after the article by default and will only load the comments as per your preference.

lazy load comments

In Settings > Discussion, there is one single option available with other comment options. You can load it on Scrolling to the area where comments are, or load on a click or disable the option. I think the On scroll works fine as it displays the comments without need an additional click action by the user (which does not seem to be lazy loading anyway as comments are hidden).

If the WordPress comments are not loaded at all, it has several advantages and disadvantages. 

A. Faster Site Loading

The most important advantage is for site speed as these hundreds of comments are not loaded and therefore the webpage size in the first load is very small and therefore the webpage is expected to load much faster. If you test page speed, you will indeed note a dramatic improvement in page speed.

Of course if you are not using a WordPress Caching plugin, you are also forcing multiple PHP calls which itself puts a lot of server load pulling all those comments and gravatar images. We tried loading comments on new page or hiding comments by jquery, but both were a different approach altogether.

Faster loading pages are good for search engine optimization with the new web core vitals statistics and therefore it is a good idea to lazy load comments.

B. Poor Comment Indexing for SEO

The main disadvantage is that the comments might not be loaded when web search robots like Google bot visits the page as it gets smart at mimicking the actual user experience, and they just might not index the WordPress comments as well as seen upfront. This might be more of an issue if you choose the ‘click to see’ comments option and should be less of an issue with the ‘scrolling’ option.

So why is this a problem? It is a problem because WordPress comments content might get poorly indexed and if that particular comment content was helping rank the page for long tail keywords, your site might lose search engine rankings for those particular pages ranking!

So practically while it is possible to lazy load comments easily, you have to take this call whether you actually want to prevent loading of comments or do you want to continue with the same.

Share with friends

About the Author: P Chandra is editor of QOT, one of India's earliest tech bloggers since 2004. A tech enthusiast with expertise in coding, WordPress, web tools, SEO and DIY hacks.