Optimizing HTTP headers for ‘ajax’ webapps
blog.mibbit.com
blog.mibbit.com
Google has already proposed a gzip content compression scheme that could operate over a number of pages.
It would also be feasible for them to come up with a header compression scheme - perhaps even in Chrome first.
X-Only-Send-Header-Changes: true
I've been getting into comet a bit more lately, and am wondering (if you don't mind telling of course) 1) what you are currently using on the backend and 2) if you ever checked out Meteor (which I was playing with today)?
I did have a look at Meteor and some of the other comet type servers but they didn't look like they would be a great solution for what I needed.
I'm not sure it's marginal though. Consider a site that has a gallery of 100 thumbnails, each one say 200 bytes in size.
With firefox3, the browser would have to send 49,500bytes of HTTP headers just to get those 100 thumbnails which are only 20,000bytes in size. That's a ridiculous overhead. Even if you're using deflate or gzip, that's only gzipping the 20k data, not the 49.5k of headers.
I can see the confusion, but you can't compare files with network. Files are allocated in chunks. So shaving off a few bytes of a file does indeed not always save you disk space.
However, if you send half as many bytes in your HTTP headers, you save that bandwidth. If you handle 600 of those HTTP requests a second, shaving every byte off that you can, is important. That's not premature optimization.
This is Comet if you really want to use that word. Comet goes over HTTP.
Using long-lifed connections, and sliding more data through as time goes on, avoids some of the overhead of additional HTTP headers that you see in opening new requests and replies.
But for sending data from the browser, you can't do any other sort of streaming, so you have to send a new request each time.
Edit- Just checked the posting history of the OP. He looks like a troll. I withdraw my comment, he was just being a jerk.
Cool demo, though. Very clever- I wouldn't have necessarily thought about the header size in the sends.