Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (16 sloc) 2.22 KB
title postRank tags
Bridgy for Webmentions with Brotli

Summary: Just a fair warning if you use the amazing Bridgy service to gather webmentions from social networking sites. It won’t actually work with your site if you’re using Brotli compression. Use gzip for your HTML requests instead of Brotli and it will work fine.

On June 11, 2019 I tweeted:

Upgraded from Zopfli to Brotli compression this morning (only used if the browser supports it).

Saves a few more KB to spend frivolously on web fonts and facepiles 😇

— Zach Leatherman (@zachleat) June 11, 2019

Unfortunately, I would learn much later that this would cause my webmentions to stop working too!

I logged into and had zero new webmentions from Twitter coming in. My webmentions from Twitter come from Bridgy. I logged into my Bridgy admin panel and saw a bunch of errors:

No webmention support:

Apparently this stopped working when I added Brotli compression to my web site. Bridgy doesn’t support Brotli compression so when it fetches my site it can’t decompress my HTML content for parsing. My site does correctly fallback to uncompressed output when Brotli support is not advertised in the request’s Accept-Encoding header, but unfortunately Google App Engine assumes that all applications support Brotli compression and always includes this in request headers made on the service 😱. Star this issue to ask Google App Engine developers to fix this!

Anyway, I modified my site to compress gzip on HTML requests and use Brotli for everything else (if supported). I’ll go back to full Brotli after this issue is fixed 🏆.

Hope this helps someone else!

You can’t perform that action at this time.