php-long-polling
php-long-polling copied to clipboard
Just a question
Since you are sending the previous modification time in every Ajax request but the first, why not have the PHP code echo the message, then die()?
If changes are missed, you could put the sleep() call in the code that writes the file content rather than in your loop.
Hi Rob, to be honest I don't know why :) This project is some years old (5 i think) and I dont remember, BUT may it has to do with the die() / exit() you mentioned, as code that contains die()/exit() is hard to test in unit tets etc (as the tests will stop when you try to test code).