Can I push HTTP on the client side?

Pretty much the opposite of the push side of the server, also known as Comet . I am wondering if you can use durable HTTP connections to transfer information to the server.

Unlike simple XHR, the connection will be kept alive, and data will be periodically transmitted to the server, as the user performs actions, etc.

Using standard technologies, I do not think this is possible, but I am open to suggestions about possible operational capabilities or inventive ways to achieve this. The goal would be to populate the data with low latency to the server for fast and efficient unidirectional streaming.

I'm not interested in using socket implementations with flash / java bridges because of the complexity of serving cross domain policies or obtaining java signatures. Raw hacks that work without additional dependencies are welcome. Preferably, the solution is implemented using javascript.

+5
source share
4 answers

I once saw a guy talk at http://orbited.org/

This is a js library that uses standard technology to support the connection between the server and the client, you can click on it.

+1
source

This can be done in one of several ways ...

POST, , POST.

+1

: http://www.speich.net/projects/programming/firebug-testing.php

: http://en.wikipedia.org/wiki/Comet_(programming)) google "x-mixed-replace"

XHR Firefox. XHR . xhr.multipart = true onload, onreadystatechange.

mime "multipart/x-mixed-replace". . flush, . .

Safari (~ = ) , . , readyState = 3, 4. , resultText, . IE.

+1

If you are looking for bidirectional communication between a browser and a server, you are probably looking for WebSockets . See the bottom of the Wikipedia article on available implementations.

0
source

All Articles