Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

[On-Site-Notifications] Is there a way to constantly check for new notifications?

+1 vote
asked Apr 20, 2015 in Plugins by gold.developer

On On-Site-Notifications plugin, how can I constantly check for new notifications (like live checking for new notifications) rather than always be refreshing the page to check if I've got new notifications? I was thinking in something like this?

setInterval('On-Site-Notifications();', 200);


Q2A version: 1.7
commented Apr 20, 2015 by pupi1985
I think you're oversimplifying things. It's like asking "How can a car be faster? Just add another engine" :)

I get what you mean and that is OK (except for the dashes), however, you need to implement the server side logic to process the AJAX request and the client side logic too. Alternatively, you could use web sockets to avoid killing your server with so many requests

Please log in or register to answer this question.