Which is better with AJAX-PHP applications, check and test over and over, or have PHP...

Blaperty

New member
...hang? I have a 2 player card game which works with PHP, and AJAX. A player takes their turn, and has to wait for player 2 to take theirs. Is it better to:

A) Have the AJAX client recheck for changes every few seconds or so (a 3 or 4 second lag is acceptable).
B) Have the PHP which responds to the AJAX request hang in a loop while it persistently rechecks for changes in a MySQL field.
C) Do a third thing I haven't thought of.
 
Back
Top