real time notifications with jquery and php
I'm trying to find some php and jquery tutorial/plugin or piece of code which enables to get the real time notifications. For example, if some data is inserted in the database, i want to receive the notification on the webpage in real time without refresh etc. If you开发者_如何学Python know any resource, please let me know. Bundle of thanks.
You will need to poll the server, preferably using long polling (not trivial with PHP).
The server can respond blank, or a JSON message if there is something to be returned.
here is periodic updater built as a jQuery plugin that tries to implement long polling and reduce the load on the server.
https://github.com/RobertFischer/JQuery-PeriodicalUpdater/
精彩评论