Hi, how to know if brotli is working? (wisej 2 beta)

Answered
0
0

As title says, I read that adding reference to brotli extension is enough, but in browser network inspector i don’t see a content encoding : br , or any size dif
Always I see gzip
(Wisej 2 beta and Firefox Quantum 63.0.3 x64 )
What if brotli isn’t browser supported, is fallback to default content-enconding?
Thanks in advance!

  • You must to post comments
Best Answer
0
0

Firefox supports Brotli on HTTPS only: https://www.mozilla.org/en-US/firefox/44.0/releasenotes/

This is how it works in Wisej 2 once you add the Brotli assembly:

  • HTTP or HTTPS support is up to the browser. When the browser returns that it accepts the “br” encoding, Wisej will compress using Brotli. Browsers return a list of accepted encoding so you are likely to see “br, gzip”. Wisej will use “br” if the Brotli assembly is in the project, or it will use gzip. This means that supporting brotli for HTTP requests is up to the  browser. Wisej uses HTTP for the initial page loading and data loading (datagrid).
  • WebSocket connections do not support any form of compression natively. So Wisej can compress using whatever we like. When the brotli assembly is present, Wisej (2) will always compress using Brotli on any browser regardless of the browser support for brotli. Othewise Wisej compresses websocket responses using Gzip. Websocket compression in Wisej kicks in when the response is bigger than 2K.

How to check?

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.

We tested by creating 2000 buttons. The response was 1.2M without compression, 35K with Gzip and 15K with Brotli.

HTH

 

 

 

Attachment
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.