Skip to content

Instantly share code, notes, and snippets.

@aNNiMON
aNNiMON / asyncRequest.js
Last active Apr 23, 2017 — forked from pabloosso/asyncRequest.js
AJAX with memoization
View asyncRequest.js
//
// 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);