As stated on their website, “Brotli is an open source data compression library from Google, it improves on gzip’s compression ratio by roughly 17-25%.”
Brotli browser support Firefox: 44+ (on by default) Chrome: 49+ (not by default, but can be enabled) Edge: 15+ (on by default) Some more info here.
Step 1: Go to https://www.iisbrotli.com/ Step 2: Click on the download button as highlighted in the below image:
Step 3: In order to download the file, you will need to create an account on the MyWe-Amp site. After you have created a new account and logged in, go to Downloads and download the IIS Brotli zip file. At the time of writing the latest version is: iisbrotli-1.1.2.zip Step 4: Unzip the downloaded file. Inside you will see a setup.exe file. Run the installation and follow the prompts. The installation is self-explanatory. The only thing to note is at the end before completion you are required to type in the email address used to register on the website. Just type it in and press enter. The installation will then complete. Step 5: Open up (IIS) Manager and make sure you click on the root website as below:
Step 6a: Double click on the Modules button (highlighted in red above). The Modules page opens up. In the pane on the top left, click ‘View Ordered List…’. At the bottom you should see the Brotli module installed as below (We-AMP IIS Brotli):
Step 7: Click ‘Register’ and in the Name dialogue type ‘Brotli’ and in the Path, navigate to the brotli.dll file located by default in ‘C:\Program Files (x86)\We-Amp\IISBrotli\IISBrotli.dll’
Click Ok once done.
Ensure Broli (the item you just added) is checked and click Ok.
Step 7: Profit!
Verifying that the extension is working
Step 1: Open up chrome and navigate to a website that is being hosted on the IIS server you just configured. One thing to note is the Brotli compression is only active on SSL connections, so you need to browse to a site with https://
Step 2: Open up the Chrome Developer Tools and go to the network tab. Click on one of the URL's that have for example made an API request. You should see under the response headers a Content-Encoding: br. See below
If you are super lazy and your site is publicly accessible you can test that the brotli compression is enabled on this site.
This walkthrough has gone through the required step to configure the Brotli compression native extension for IIS. Doing it this way has the advantage of enabling the module for all sites without requiring messing with the web.config files. The other option, of course, is to configure it via config files. If anyone is interested in how to do this let me know.