Open mattijsbliek opened 9 years ago
Great suggestion! Will try to find time to work on it but PRs are always welcomed :)
Great, I'll try to work on something tomorrow :)
I'm a bit out of my depth here. Will continue to work on something, but it will take longer than I anticipated.
No worries. Will have a look myself when I have time.
Anything happen with this? Would love to do some testing around this API :)
Unfortunately I'm too busy to work on this soon. Pull Requests are super appreciated.
I took another look at implementing this and it might be tricky to implement fully. Firefox uses the same quota as for IndexedDB. But since this quota is per origin, it can vary according to how many domains your caching files from. Ideally you would be able to select the number of origins (say 1 through 5) you will be caching from. As a first version however, you could of course just use the root origin only.
More importantly, you can only add things to the Cache API that are served from a secure origin. So the BrowserStorageAbuser demo would need to run on https before the Cache API can be implemented.
I can't take care of the https part for the demo, but I can try giving this another go somewhere in the next week or so.
Making the site working on HTTPS shouldn't take that much time. I'll work on it.
Tried giving this another go but I'm having a hard time seeing what's going on in the code, and not being very familiar with Angular doesn't help. I don't think I'll be able to add the Cache API myself, sorry!
@mattijsbliek thanks for your challenge. I know it's a messy code but can be much simpler with ES6. I'll give it a try when I find some time.
No worries, thanks for looking into it @mattijsbliek.
Firefox, Chrome, and Opera now offer basic support, so would be great to add this.
My first guess would be that storage for the Cache API is the same as that for IndexedDB, but I might be wrong.