Implement indexDB roughly.