How does disqus work? How does disqus work? ajax ajax

How does disqus work?


The general pattern used is JSONP

Its actually implemented in a fairly sophisticated way (at least on the jQuery site) ... they defer the loading of the disqus.js and thread.js files until the user scrolls to the comment section.

The thread.js file contains json content for the comments, which are rendered into the page after its loaded.


You have three options when adding Disqus commenting to a site:

The main advantage of the integrated solutions is that they're easy to set up. In the case of WordPress, for example, it's as easy as activating a plug-in.

Having the ability to communicate with the API directly is very useful, and offers two advantages over the other options. First, it gives you as the developer complete control over the markup. Secondly, you're able to process comments server-side, which may be preferable.


Looks like that using easyXDM library, which uses the best available way for current browser to communicate with other site.