Reputation: 37
I was wondering can web servers initiate communication with web browsers? from my understanding they communicate but can web server innitiate it?
Upvotes: 1
Views: 1997
Reputation: 885
Web servers using HTTP cannot. However, there are some new web technologies around the corner that hope to change that. Check out SPDY. One of their technical goals is:
To enable the server to initiate communications with the client and push data to the client whenever possible.
Upvotes: 0
Reputation: 39014
No. The client must establish and maintain some kind of connection, ie HTTP, WebSocket, or AJAX before the server can send any data. Once the browser window is closed the session is lost and the server can send no more data. In WebSockets the server can push data asynchronously but only through the established connection that the client initiated.
Upvotes: 2