So long Disqus, hello Webmention
Enough. I’m fed up with Disqus. It’s been useful, easy to plug on this blog, but it’s a mess for web performance, and I don’t own my data, so… bye bye. Webmention is now a great alternative, with more people implementing it, so let’s try to keep only that.
So long Disqus
When I launched this Jekyll based site a while ago, I didn’t put any comment system, because I didn’t like any of the options available at the moment.
Later, I was missing the interaction I had on my previous dynamic blog powered by SPIP, so I jumped in the Disqus train, because it was the most used around me, and on the sites I visited.
Disqus is so easy to use with Jekyll
Installing Disqus on a blog only requires a few lines in the post template, with two JavaScript variable to set with Liquid values. Really easy.
Then generate the site, deploy, and it works!
But Disqus is a pain for actual and perceived web performance
I hate how Disqus feels so slow when I browse pages using it.
In fact, Disqus loads asynchronously, so it doesn’t really affect the Speed Index of the page on initial load and rendering, but I hate almost every use of lazy loading1, and Disqus’ one is really bad. I scroll the page to the post end, and then Disqus loads the comments and suggested content, pushing everything else, with an annoying repaint. I hate that. It makes me feel like the site is slow.
Also, Disqus loads around 450 kB of data — mostly JavaScript — on the pages, which is not so light for “just” comments. And it loads that from 5 or 6 different domains2, without a great caching optimization.
This page’s weight before and after removing Disqus, as shown in my Dareboost monitoring. Disqus accounted for three quarters of the page weight!
Disqus also requires a few rules in your Content Security Policy, but that’s manageable.
Also, not everyone likes to comment on Disqus
Disqus being a third party service, we don’t know what our comments become and how Disqus tracks us accross blogs, how we are becoming the product.
The famous Geek&Poke cartoon with pigs talking about the “free” model.
I can of course export all comments to keep my own local copy, but it’s not as convenient as a true local storage.
Some people also don’t like being forced to create an account on Disqus to be able to comment.
If you use Disqus on your blog, please active the “Allow guests to comment” option in the settings!
If you use Disqus, please allow guests to comment without an account
Comments history is not lost!
Of course, removing Disqus could have meant losing the comments made so far. But I don’t like to lose valuable content. Some of the comments you make on my posts are even more valuable than the posts themselves!
So, I used Pat Hawks’s jekyll-disqus-comments plugin to get a copy of all comments into YAML data files.
I had to clean them a lot, mostly manually, because they were an HTML mess. Maybe not only because of Disqus, but also because they had already been migrated from SPIP before.
The comments are shown below posts has before3, but they are now static, using a Jekyll template, without Disqus being involved anymore.
Hello Webmention
I added Webmention to this blog a while ago, with some success on popular posts like How much data should my Service Worker put upfront in the offline cache?.
I also see that Webmention use is growing elsewhere. For example, Rachel Andrew chose to adopt Webmention because she add to much SPAM:
I had to turn off comments on my recent posts due to them being used as a vector for anonymous abuse. New site will use Web Mentions.
— Rachel Andrew (@rachelandrew) July 4, 2017
I discovered Webmention a while ago thanks to Jeremy Keith’s experiments with Webmention on his own blog.
So, what is Webmention?
Webmention is a W3C recommendation since January 12nd 2017, based on the great work of IndieWeb people.
Drew McLellan, developer of the Perch CMS with Rachel Andrew, explains very well the Webmention flow:
- Frankie posts a blog entry.
- Alex has thoughts in response, so also posts a blog entry linking to Frankie’s.
- Alex’s publishing software finds the link and fetches Frankie’s post, finding the URL of Frankie’s Webmention endpoint in the document.
- Alex’s software sends a notification to the endpoint.
- Frankie’s software then fetches Alex’s post to verify that it really does link back, and then chooses how to display the reaction alongside Frankie’s post.
Reminds you of manual trackbacks and Wordpress’ automated pingbacks? Indeed. Let say it’s a standard way to do almost the same.
Trackbacks and pingbacks failed mostly because of SPAM, and IndieWeb is taking this seriously for Webmention’s future, with intense work on Vouch, an anti-spam extension to Webmention. Let’s hope it gets implemented soon everywhere.
James Richman explains in this post: Is W3C Replicating the WordPress Pingback System?
How does it work on this site?
Webmentions for this site are collected by two services:
- webmention.io “is a hosted service created to easily handle webmentions (and legacy pingbacks) on any web page”. I use it as my Webmention endpoint. This is an open source project built by Aaron Parecki, co-founder of IndieWebCamp and editor of the W3C Webmention and Micropub specifications4.
- Bridgy “pulls comments, likes, and reshares on social networks” (Facebook, Twitter, Google+, Instagram, Flickr, etc.) and push them to my Webmention endpoint. This is an open source project built by IndieWeb people, and is free to use.
Once Webmentions are in webmention.io, they are pulled into my jekyll sources thanks to Aaron Gustafson’s jekyll-webmention_io plugin for Jekyll, and added to my posts pages.
There are still a few issues to fix
All of this is great, but there are a few issues I’ld like to fix as soon as possible.
First, there are some Webmentions that should not be shown, either because they are useless, or because they are duplicates. webmention.io now provides a way to remove mentions, and will evolve to add a block function.
Also, I should group mentions by type. Likes, for example, can be take much less space in the page. Aaron Gustafson grouped mentions by type on his blog, but I’ld like to show them as facepiles, like Drew McLellan:
Nice facepiles for likes and reposts on Drew McLellan’s site.
I also have issues with some avatars that come directly from Twitter, and are really heavy. The new version of Aaron’s Jekyll plugin will allow me to define my own template, and use Cloudinary to resize and optimize these images. I have yet to try it, because I’m still using the old single file version, while the new one is now a gem.
-
Don’t get me started on Medium’s stupid images lazy loading which makes me see only blured useless things when I scroll… ⬆︎
-
So as many DNS requests are needed. ⬆︎
-
Here is an example of comments preserved for a popular post. ⬆︎
Si vous voulez signaler une erreur ou proposer une modification de ce texte, n'hésitez pas à l'éditer directement à la source sur Github.
Webmentions (?)
Possibly useful, when you figure out what you want to do with avatars: cloudinary.com/documentation/…
how would you say this compares to portier (portier.github.io)? i’ve been thinking of building a comments system using that
Portier would more be an equivalent of IndieAuth: indieweb.org/IndieAuth
Ojalá cada vez hablemos más de Webmention → So long Disqus, hello Webmention nicolas-hoizey.com/2017/07/so-lon… vía @nhoizey