Skip to content

Instantly share code, notes, and snippets.

@aNNiMON
aNNiMON / asyncRequest.js
Last active April 23, 2017 13:46
AJAX with memoization
//
// Author: Dustin Diaz
// http://dustindiaz.com/faster-ajax/
//
var asyncRequest = function() {
function handleReadyState(o, callback, fallback) {
if (!o || o.readyState != 4) return;
if (o.status == 200) {
if (callback) {
callback(o);