Websocket permessage-deflate

141 views
Skip to first unread message

Thomas Bellos

unread,
Jul 25, 2017, 9:00:45 AM7/25/17
to Google Chrome Developer Tools
Hi

Is there a way to determine that the websocket traffic is compressed?
From the developer tools I can see that the server response headers include
Sec-WebSocket-Extensions:
permessage-deflate
Does this mean that all traffic is compressed from now?
It would be useful if there was an indication in the dev tools frame examination that verifies this
Is there anyway to check this?

Regards

Kayce Basques

unread,
Jul 26, 2017, 5:31:46 PM7/26/17
to Google Chrome Developer Tools
From Configuring And Optimizing WebSocket Compression:

If the server omits the extension confirmation then the use of permessage-deflate is declined, and both the client and server proceed without it - i.e. the handshake completes and messages won't be compressed. Conversely, if the extension negotiation is successful, both the client and server can compress transmitted data as necessary:

So, look for Sec-WebSocket-Extensions:permessage-deflate in both the Request Headers and Response Headers sections to determine if compression is being used.

For example, in the screenshot below it's in the request headers, but not the response headers, so it looks like compression is not being used.

Kayce Basques

unread,
Jul 26, 2017, 5:35:53 PM7/26/17
to Google Chrome Developer Tools
Oh sorry, after reading your question again it sounds like you already knew that.

If the Frames tab displayed some information about compression, what would you expect that to look like? Do you want it to actually display the compressed data? Or just a "Compressed" column in the table with a value of "Yes" / "No"?
Reply all
Reply to author
Forward
0 new messages