random memes }

Bouncing JSON requests - Javascript

Simple measure of round-trip times for bouncing a JSON request off a server.  The server-side script (bounce.php) is:

date('Y.m.d H:i:s'), 'uname' => php_uname() ); echo json_encode($a); ?>

The code to generate a JSON request (in bounce.html) is in effect:

var o = JSON.makeGET("bounce.php"); o.onResponse = function(v) { // use v }; o.sendGET();

Where v is the JSON response (click bounce.php to see a response).