![Picture of Terry Woody Picture of Terry Woody](/picture/user/418079.png)
Terry Woody - 2017-09-14 16:07:05
Hi Ettore.
Is there way to restrict the client from calling HttpLongPoll.php to certain amount?
Looking at browser left open over night and see like 300+ GET to HttpLongPoll.php Like to stop calls after X number of times.
Also, what are your recommendations for a live site? Not sure I fully understand the optimal settings.
---SERVER config---
// Seconds to wait for deleting users from the table... USE THE SAME TIME FOR THE SESSION
const DELETE_AFTER_SECONDS = 60;
//Seconds to wait for call to the db... INCREASE THIS VALUE IN PRODUCTION
const POLL_WAIT_SECONDS = 2;
---CLIENT XajaClient---
timestamp = json["last_server_timestamp"];
setTimeout("longPollNotification()", 1000);
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
setTimeout("longPollNotification()", 15000);