Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cache API #5

Open
mattijsbliek opened this issue Oct 12, 2015 · 11 comments
Open

Add Cache API #5

mattijsbliek opened this issue Oct 12, 2015 · 11 comments

Comments

@mattijsbliek
Copy link

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.

@agektmr
Copy link
Owner

agektmr commented Oct 12, 2015

Great suggestion! Will try to find time to work on it but PRs are always welcomed :)

@mattijsbliek
Copy link
Author

Great, I'll try to work on something tomorrow :)

@mattijsbliek
Copy link
Author

I'm a bit out of my depth here. Will continue to work on something, but it will take longer than I anticipated.

@agektmr
Copy link
Owner

agektmr commented Oct 14, 2015

No worries. Will have a look myself when I have time.

@pieterv
Copy link

pieterv commented Jun 21, 2016

Anything happen with this? Would love to do some testing around this API :)

@agektmr
Copy link
Owner

agektmr commented Jun 23, 2016

Unfortunately I'm too busy to work on this soon. Pull Requests are super appreciated.

@mattijsbliek
Copy link
Author

mattijsbliek commented Jun 23, 2016

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.

@agektmr
Copy link
Owner

agektmr commented Jun 23, 2016

Making the site working on HTTPS shouldn't take that much time. I'll work on it.

@mattijsbliek
Copy link
Author

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!

@agektmr
Copy link
Owner

agektmr commented Jun 28, 2016

@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.

@pieterv
Copy link

pieterv commented Jun 28, 2016

No worries, thanks for looking into it @mattijsbliek.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants