Many Internet users are wondering: “Notification in the browser - what is it?” It displays a specific style of Internet surfing, where a request for a transaction is initiated from a central server. This contrasts with the reverse direction of data, where a request for information transfer is initiated by the recipient or client.
Notification services are often based on information preferences expressed in advance. This is called a publication subscription model. The client “writes out” various information “channels” provided by the server. Whenever new content is available on one of these channels, the server sends this information to it. Notification in the browser sometimes emulates with polling techniques, especially in conditions where a real request is not possible - for example, on sites with a serious security policy that require rejecting incoming HTTP / S requests.
Operating principle
Synchronous conferencing and instant messaging are typical examples of how notification sounds. What is it and how does it work? Chat messages and sometimes files are pushed to the user as soon as they are received using the messaging service. Both decentralized LVS peer connections and centralized programs (such as IRC or XMPP) allow you to push files. This means that it is the sender who initiates the data transfer, and not the receiver.
E-mail can also work with notification - the SMTP protocol is, in its essence, a “push”. Nevertheless, the last “step” from the mail server on the computer usually does a load protocol like POP3 or IMAP. The IMAP protocol includes an IDLE command, which allows the server to inform the client about new messages. The original BlackBerry was the first popular device where notification in the browser worked actively. What is it in these gadgets - can be seen in the work of e-mail (with wireless).
What happened before?
Another example is the PointCast network, which was known in the 1990s. She provided news and stock market data. Both Netscape and Microsoft applications integrated it into their software in each version of their browsers, but it was never popular, and later completely disappeared. Browsers subsequently replaced this functionality in the 2000s with an RSS - subscription system, where there is a more advanced notification in the browser. What is subscription data - every blog reader knows.
Other uses of notifications that support web applications include market data reporting (stock quotes), online chats and messaging systems (WebChat), auctions, online bets and games, sports sweepstakes, dashboards and the like.
Notification in the browser - what is today?
IEFT Notification is a simple protocol that uses HTTP / 2 to deliver instant notifications (of incoming calls and messages). The protocol combines all real-time events in one session, which provides a more efficient use of network and radio resources. A single service integrates all events, distributing them for applications as they become available. This requires only one session, which avoids unnecessary time and traffic.
Notification in the browser - what is it from a technical point of view?
HTTP notification (also known as streaming HTTP) is a mechanism for sending data from a web server to a browser. It can be achieved using any of several mechanisms. Typically, the web server does not terminate the connection after the notification has been sent to the client. The web server leaves the connection open, and in case of a new event (for example, a change in the data sent in the message) this will be displayed instantly. Otherwise, the event will have to be queued until the next client request is received.
Most web servers offer this feature using CGI (for example, unformatted Apache script headers). The basic mechanism for this approach is block transmission coding. A classic example is the browser notification in Odnoklassniki. What is this on this site? First of all, this is information about incoming messages and likes.
Alternative mechanisms
Another mechanism is associated with a special type of MIME called multi-component replacement. It was first introduced in 1995 by Netscape, when browsers “on the fly” change a document whenever a new version arrives on the server. It is still supported in Firefox, Opera, Safari today, but is not available in Internet Explorer. This mechanism can be applied to HTML documents, as well as for streaming images in webcam applications.

WHATWG Web Applications 1.0 includes a mechanism that directs changed content to the client. It has been known since September 1, 2006, when Opera launched this new experimental system called Server-SentEvents in the Opera web browser. It is currently standardized as part of HTML5. In this method, the server uses a persistent HTTP connection, as a result of which the response remains “open” (that is, the server never stops responding), effectively “tricking” the browser. Thus, the application remains in load mode all the time after the page has already opened in full. The server then periodically sends JavaScript fragments to update the contents of the page, thereby providing the possibility of notification. Using this technique, the client does not need Java applets or other plug-ins to maintain an open connection to the server - the client automatically receives notification of new events coming from the server. One serious drawback of this method, however, is the lack of control by the server on the time of the browser. A page refresh is always necessary if a timeout occurs on an open page.
Data storage
The technique of memorization in itself is not a true notification. It only allows you to emulate the notification mechanism in conditions when it is not possible. For example, on sites with demanding security policies that require rejection of incoming HTTP / S requests. Notification in the browser is not possible here (what it is and how it works is indicated above). In this case, the client requests information exactly as in a normal request, but because of the wait, the server cannot immediately respond. If the server does not have any new information for the client when the request is received, instead of sending an empty response, the request remains open, waiting for new information. After such data appears, it immediately sends an HTTP / S response to the client, ending an open connection.
After receiving a response, the client often immediately issues a request to another server. Thus, the usual response delay time (the time between when the information becomes available and the next client request) associated with the receipt of requests is excluded.
XML socket
Browser notifications using this method are used by CBOX and other chat applications. It uses XML Socket objects in single-pixel AdobeFlash files. Under the control of JavaScript, the client establishes a TCP connection to unidirectional nodes on the server. The request remains unread, instead, the node immediately sends the client a unique identifier. Then an HTTP request is made to the web server, which contains the received identifier. The web application can then issue messages addressed to the client to the local interface of the relay server, which transmits them via Flash. The advantage of this approach is that it uses the natural asymmetry of read-write.

This is typical of many web applications, including chats, and, as a result, provides high efficiency. Since it does not accept data on outgoing sockets, the server does not need to request outgoing TCP connections, and this makes it possible to establish tens of thousands of simultaneous connections. This is how the notification occurs in the browser on Odnoklassniki in some site services.
Notification Services Available
This feature is available on many services that support the above connections. As already established, notification in the browser is the ability to receive instant messages and notifications without reloading the page. Services where this service is available include:
- Apple Notification Service.
- Google Cloud Messaging
- "Classmates."
- Facebook
- Xtremepush.
- Amazon SNS