AJAX Comment Loading

July 09, 2012

AJAX Comment Loading Plugin

Loads comments with a secondary AJAX request, including comment paging. Speeds initial loading of the page.

When your posts get a lot of comments, performance can be a concern. The generation of the comment HTML and the delivery of all that HTML can slow down your page loads. This plugin has pages load without comments, and then uses a secondary AJAX request to pull down the comments. Navigating through the pages of comments is also handled via AJAX. On my test install with 100 comments per page, the onload event fires 2x faster. The HTML is generated by the server 6x faster. The HTML downloads 3x faster. The uncompressed size of the HTML is reduced by a factor of 17.

Initial development of this plugin was commissioned by Google — many thanks!

Installation

  1. Upload the ajax-comment-loading folder to your /wp-content/plugins/ directory

  2. Activate the “AJAX Comment Loading” plugin in your WordPress administration interface

  3. View a page with more than X comments.

FAQ

Why doesn’t it work on my theme?

Your theme may substantially deviate from standard WordPress comment section HTML layout. The plugin was developed against the Twenty Ten theme. Try another theme, or try standardizing your theme’s HTML. I don’t plan to add support for other markup — I’d rather that people work on standardizing their theme comment markup instead.

Doesn’t this prevent search engines from seeing comments?

No, it doesn’t! Through the magic of Google’s “AJAX Crawling” specification, search engines (currently Googlebot and Bingbot) will be made aware that the page includes AJAX-fetched content, and will request your page with a special URL that will have this plugin skip AJAX-generation and instead give the full HTML to the crawler.

Changelog

1.0

  • Original release.
  • Initial development commissioned by Google — thanks!

Details

  • Version: 1.0
  • Active installations: 100
  • WordPress Version: 3.4
  • Tested up to: 3.4.2

Ratings


5 Stars
4 Stars
3 Stars
2 Stars
1 Stars