In Juvia, comments are contained in two hierarchical layers. Comments are contained within topics. Topics are are contained within sites. A site is owned by exactly one user who can administer everything within it. This is similar to how many web forums works.
Sites must be registered (created) manually, but topics are automatically created upon posting a comment to a particular topic.
Juvia does not use any
iframes. The HTML for displaying the comments
and the form is directly embedded inside the page. In order to work well with AJAX
web pages, Juvia never reloads the current page, nor does it ever redirect to another
.main .comment-container > div.
The topic_key. This is a unique identifier within the context of a site (it is allowed for another topic within another site to have the same topic key). Unlike the site key, the topic key is not pre-generated: you can pick one yourself, but it must not be longer than 255 characters.
When a comment is posted it is automatically stored within the topic that is referred to by the given site key and the topic key. If there is no topic with such a topic key within the site, then the topic is created.
Fetching from and posting to on other domains is usually forbidden by the browser's same origin policy. Newer browsers support a mechanism called Cross-Origin Resource Sharing (CORS) which allows browsers to perform AJAX calls to other domains, and Juvia uses this whenever possible.
On older browsers that don't support CORS, Juvia falls back to a
JSONP-like technique that
script tags to perform cross-domain requests.
Request parameters are embedded in the tag's URL. However, because browsers
impose a limit
on the maximum size of URLs, only a limited amount of data can be posted.
The lowest common denominator seems to be Internet Explorer which imposes
a limit of 2083 characters. This means that on non-CORS capable browsers,
the user will be unable to post large comments. In order to reduce the
impact of this problem, Juvia compresses the comment text with zlib.
Juvia has full support for AJAX web pages, i.e. web pages that are dynamically updated without reloading the page itself or redirecting to another page. Simply execute the Juvia embedding code again (with possibly different options) and everything will work as expected. It is even possible to embed multiple Juvia comment pages on a single web page.
It is possible to embed multiple Juvia comment pages on a single web page. Just specify different container paths for each of them.