Server Push Technology

  
Server push - a new "push" technology, which is an advanced communication connection between server and client, using the CGI script on the server side to continuously push data to the client, thus The interaction between the client and the server is greatly improved. In the China Computer Newspaper computer studio, we introduced Server push. We also collected some information about Server push for your reference.

first also came to see the working of the traditional Client pull, Client pull up in such a HTML document automatically refresh the page, the user's browser can continue to refresh the server to accept the return of content, the user I have to endure the pain of waiting for the "tmie" value. I believe that under the speed of China Telecom, everyone has a deep understanding of this.

server using the Server push technology after a request made in the client, and the client to establish a permanent connection, and then the server will continue to push the client data packets according to the client's request, the push The process is uninterrupted. The data pushed by the server to the client will continue to generate new content on the client's browser, and will not generate the HTML document header like Client pull, thus greatly reducing the delay time to (server response - client Request) Synchronization took a step forward.

realize Server push technology is very simple. Server push changes the traditional content-type:text/html to a document type such as content-type:multipart/x-mixed-replace;boundary=BOUNDARY when the server's CGI script declares the HTML document type, and it will feed back to the user. A connection of type Server push. This is the fundamental difference between Server push and Client pull. If such an HTML document header is provided in a CGI script, the server will force the data specified in the CGI script to the client when processing the client request to invoke the CGI script.

Server push uses a lot of techniques to generate user-side browser page generation when generating pages. There is no essential difference between the main program and the traditional method, but remember to add print "Content-Type:multipart/x-mixed-replace;bound" to the script.
Copyright © Windows knowledge All Rights Reserved