简体   繁体   中英

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 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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM