On Jul 5, 2013, at 01:36, Arnout Kazemier wrote:

> What makes you think there's no standard for compression?

Because I Googled "socket.io compression" and found pages like this:


This unresolved socket.io issue requests per-frame deflate support be added:

https://github.com/LearnBoost/socket.io/issues/1148


This discussion says socket.io doesn't use compression, and suggests an 
in-browser JavaScript-based compression method:

https://groups.google.com/forum/#!topic/socket_io/zU5BE8vhMnY

It references this page:

http://www.mail-archive.com/[email protected]/msg20418.html

Which says:

> The current Web Socket wire protocol does not make allowances for compression.


Although that is from 2010.


This page talks about optimizing websocket traffic by making JSON data smaller, 
for example using an ordered array instead of an object with named keys.

http://buildnewgames.com/optimizing-websockets-bandwidth/

At the end, it explains why true compression is not possible:

> Older drafts of the WebSocket specification described a deflate-stream 
> extension that applied compression to the stream. However, there were many 
> potential issues with this extension. Len Holgate sums up the pitfalls 
> regarding deflate-stream, which was pulled in 11th draft of the specification 
> (§9.2.1). There is an alternative, however, and that is theper-frame DEFLATE 
> extension.
> 
> The good news is that the deflate-frame extension landed in WebKit back in 
> February. The bad news is that there is not yet a WebSocket implementation in 
> node.js that implements the extension, although that will hopefully change 
> really soon.


"that will hopefully change really soon" is a link to an unresolved issue in 
the ws bug tracker:

https://github.com/einaros/ws/issues/34


> WebSockets have a deflate extensions

According to what I've read, there used to be per-stream deflate support, it 
was removed because it was problematic, they were talking about adding 
per-frame deflate support, and lately have changed this to proposing 
per-message deflate support, but I don't know if this spec was finalized or if 
any browsers implement it.


> and gzip is support by nearly every browser that you can download.

For normal HTTP responses, I have no doubt of this. For POST requests, I'm 
having trouble finding confirmation of that. For web sockets, the information 
I'm finding says this is not the case at this time, but the reason I'm asking 
is I'm not sure how current the information is that I found.



-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to