Skip to content

Instantly share code, notes, and snippets.

@jxnl
Created May 21, 2014 15:58
Show Gist options
  • Save jxnl/645a4fc3bfcd40987cae to your computer and use it in GitHub Desktop.
Save jxnl/645a4fc3bfcd40987cae to your computer and use it in GitHub Desktop.
// http://app.toronto.ca/DevelopmentApplications/dwr/test/MapSearchService
var reply0 = function(data)
{
if (data != null && typeof data == 'object') console.log(dwr.util.toDescriptiveString(data, 100));
else dwr.util.setValue('d0', dwr.util.toDescriptiveString(data, 1));
}
function keep_alive() {
http_request = new XMLHttpRequest();
http_request.open('GET', "/restricted_file_url");
http_request.send(null);
};
setInterval(keep_alive,840000); //My session expires at 15 minutes
@mapyourproperty
Copy link

Great code and clear and simple and console. Look forward to contributing to your code. This is great for the Open Data Community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment