Monday 11 August 2014

Examples

HTTP server push (also called HTTP streaming) is a mechanism for sending unsolicited (asynchronous) knowledge from a web server to a web browser. HTTP server push can be achieved through any of several mechanisms.

Usually the net server does not terminate a connection after response knowledge has been served to a client. The net server leaves the connection open so that if an event occurs (ex: alter in internal knowledge which needs to be reported to or multiple clients), it can be sent out immediately; otherwise, the event would must be queued until the client's next request would have been received. Most web servers offer this functionality by CGI (e.g., Non-Parsed Headers scripts on Apache). The underlying mechanism for this approach is Chunked transfer encoding.

Another mechanism is related to a special MIME type called multipart/x-mixed-replace, which was introduced by Netscape in 1995. Web browsers interpret this as a document changing whenever the server feels like pushing a brand spanking new version to the client.[1] It is still supported by Firefox, Opera, and Safari today, but it is ignored by Net Explorer.[2] It can be applied to HTML documents, and also for streaming images in webcam applications.

The WHATWG Web Applications one.0 proposal[3] includes a mechanism to push content to the client. On September one, 2006, the Opera web browser implemented this new experimental process in a feature called "Server-Sent Events".[4][5] It is now being standardized as part of HTML5.[6] Another related part of HTML5 is the WebSocket API, which allows a web server and client to communicate over a full-duplex TCP connection.

Pushlet

In this method, the server takes advantage of persistent HTTP connections, leaving the response perpetually "open" (i.e., the server never terminates the response), effectively fooling the browser to stay in "loading" mode after the preliminary page load could be thought about complete. The server then periodically sends snippets of JavaScript to update the content of the page, thereby achieving push capability. By using this method, the client doesn't need Java applets or other plug-ins in order to keep an open connection to the server; the client is automatically notified about new events, pushed by the server.[7][8] serious drawback to this method, however, is the shortage of control the server has over the browser timing out; a page refresh is always necessary if a timeout occurs on the browser finish.

No comments:

Post a Comment