[SOLVED] Help with Brotli compression

Answered
0
0

Hi,

in Visual Studio, on the project (ex wisej 1.5 converted in wisej 2) I do right click, add ‘new item’ select Brotli

it added the reference Wisej.Web.Ext.Brotli.dll

in my Default.json for security I have add   “enableWebSocketCompression”: true

I have also try to load Wisej.Web.Ext.Brotli.dll from github

but the compressione does not seem to work, the response Header has not the ‘br’ content encoding

regards

Cristian

  • You must to post comments
Best Answer
0
0

Argh, I have just discovered that the WebSocket Protocol was not supported in IIS 7.5

Sooner or later I have to decide to migrate to a newer Windows server :-/

Thank you

  • You must to post comments
0
0

Hi Luca,

with Chrome, under WS -> Frame but I have Opcode -1

I attach screen shot

  • Luca (ITG)
    Is WebSocket enabled on the IIS server?
  • You must to post comments
0
0

Sorry for the late replay.

Here are some info:

  • Apparently Chrome sends Accept-Encoding:br only over HTTPS only now: https://www.chromestatus.com/feature/5420797577396224
  • enableWebSocketCompression: true is not needed. It is true by default. Not a single browser supports any type of compression over WebSocket. but…
  • … Wisej will compress responses from the server (when more than 2048 bytes, otherwise it’s counter productive) with gzip or brotli and it works with all browsers since we deflate on the client using javascript (pako for gzip and google for brotli). You can verify by comparing the length in the Network/Frames panel.
  • To see WebSocket frames, refresh the page in Chrome, look in Network for an app.wx request that says “type: websocket”. Select it, you will see a tab that says Frames, select it, you will see all the web socket communications. The compressed packets show as binary blob. See this post.

HTH

 

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.