w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How do they do real time website notifications?

About 2 years ago stackexchange started using web sockets as stated here: http://meta.stackexchange.com/questions/125677/new-feature-real-time-updates-to-questions-answers-and-inbox

If you take a look at the stackoverflow site source you will see that a JavaScript function subscribes to a web socket server.

There are many different approaches to that technology now. Microsoft for example introduced SignalR (http://signalr.net/) which degrades gracefully to older browser too by switching to other technologies where sockets don't work like long polling (asking every X seconds if changes are available).

You as a Python guy would probably start looking at something like: https://pypi.python.org/pypi/websockets/1.0

Have fun with web sockets!





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.