Category : long-polling

For start my JS and PHP code JS: jQuery.ajax({ type: "POST", url: long.php, dataType: ‘json’, cache: false, timeout: 10000, success: function(resp) { //do something… observeChanges(); }, error: function() { observeChanges(); } }); and PHP session_write_close(); ignore_user_abort(false); set_time_limit(60); header("Cache-Control: no-cache, must-revalidate"); while (true) { if ( connection_aborted() || connection_status() != CONNECTION_NORMAL ) { break; }; //do ..

Read more

I am new to the Long-polling requests concept and having an issue with the requests from an Angular project to PHP XAMPP local server. When the request time limit is set to 0 like set_time_limit(0); The requests stay alive forever. Even after the client reloads the website page or closes the whole tab the request ..

Read more

I am new to the Long-polling requests concept and having an issue with the requests on PHP XAMPP local server. When the request time limit is set to 0 like set_time_limit(0); The requests stay alive forever. Even after the client reloads the website page or closes the whole tab the request won’t stop processing the ..

Read more