So, I have the following test code:
Test>
Have a look at Service Workers.
OLD ANSWER:
Otherwise, did you take a look at localStorage?
Also, check out this blog post about how to store binary data in localStorage.