move the cache, allow running in browser (via a web server) and in node