What is the best way to do Ajax request refreshing?
I have the following right now:
setInterval(function() {
$.post('upload.php', function(finish)
{})},30);
Unfortunately it’s too slow for me because I need it to refresh in 0.030 seconds at most.
How can I improve the performance to meet my needs?
based on your comments about wanted to request information for a multiplayer game,
normally clients will do some dead-heading on every field that needs some sort of web-update. This is what 'lag' is in normal gaming. The different between what the player's client thinks other are doing before it gets an update of what really is going on.
30 msec is a very quick timeframe to be doing this over a webserver and should be done using WebSockets (as others have pointed out in the comments).