Skip to content

Instantly share code, notes, and snippets.

@JosePedroDias
Created July 11, 2014 16:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JosePedroDias/58b715cb775c6e9ca211 to your computer and use it in GitHub Desktop.
Save JosePedroDias/58b715cb775c6e9ca211 to your computer and use it in GitHub Desktop.
synchronous AJAX. don't do it :P
var ajax = function(uri) {
var xhr = new XMLHttpRequest();
xhr.open('GET', uri, false);
xhr.send(null);
return xhr.responseText;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment