Hello,
I’m trying to build notification system with JavaScript and PHP, (when someone likes your post, photo etc you get notification, something like facebook) everything work fine but I need one advice.
In which time interval should I call AJAX request to check for new notifications?
Not exactly an answer to your question, but have you considered using WebSockets instead? You could maintain a connection between the clients and the server and just send the data when a user has a notification. This way, you don’t have to poll with AJAX. Notifications will be real-time.
3 Likes
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.