It refreshes instantly due to the optional Javascript snippet that we provide to you!

Here's how it works:

  1. User posts a comment.
  2. JS snippet prevents form submission and submits it to our API as an XMLHttpRequest.
  3. Upon receiving a successful response, the comment is saved in localStorage, so that the user sees it instantly. This prevents confusion and double submissions.
  4. When the Netlify build finishes and the comment becomes static prebuilt HTML, the comment gets removed from localStorage.

The comment is also visible for other users using the pending comments API that dynamically loads comments that haven't built yet. So if there's a lot of comments in a short time window, the comment section acts like dynamic comments until the Netlify build finishes.

You can test this by submitting a comment and then seeing how it's visible in an incognito window :-)

As I mentioned, Welcomments also works without any Javascript, but in that case, it's not very interactive and you have to wait for a couple minutes for the Netlify build to finish.

GitHub-flavored Markdown & a sane subset of HTML is supported.