Brotli

How to Use

Add a new item of type Brotli to the existing Wisej.NET project:

Firefox supports Brotli on HTTPS only.

How to check if Brotli compression is used?

For HTTP just look at the network using dev tools, and if it shows “br” in accept encoding then look at the size of the response with and without the brotli assembly.

For WebSocket you need to look at the “frames”. In Chrome use F12, in the Network make sure WS is selected, then click on the app.wx initial request, you should see “Frames”, select it and you should see all outgoing and incoming websocket messages. The compressed ones show as [Binary Frame]. Look at the size with and without the Brotli dll.

Compression in Wisej is only effective for packages above a certain threshold (2048 bytes).

The first load is never brotli because html responses from the browser don’t get compressed. Brotli or gzip in Wisej.NET kick in after the websocket is established and after the app is loaded.

Find more information in our Brotli Blog.

Last updated