paulirish/lazyweb-requests — Issue #52: Offline XHR replay browser extension
Author: paulirish
Created: 2012-02-12 08:52:37+00:00
State: open

general idea:

* when you go offline, `window.XMLHttpRequest` gets duckpunched with a mock object.
* could probably use [sinon.js's FakeXMLHttpRequest](https://github.com/cjohansen/Sinon.JS/blob/master/lib/sinon/util/fake_xml_http_request.js)
* all calls to it are logged and saved in sessionStorage.
* when you go back online, you have some mechanism available to replay the calls.
* the original callbacks are fired with the return payload

for a good amount of tabs I currently have open, I feel like this is totally reasonable and would work.

i figure the audience would mostly be developers, but who knows.

I could also imagine site specific hacks, but it'd be tremendously good to have a community of developers offline-enabling sites/apps on their behalf.