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

Cache to localStorage using If-Modified-Since #495

Closed
bburky opened this issue Feb 28, 2014 · 1 comment
Closed

Cache to localStorage using If-Modified-Since #495

bburky opened this issue Feb 28, 2014 · 1 comment

Comments

@bburky
Copy link
Contributor

bburky commented Feb 28, 2014

Is it possible to make the asset cache backed by localStorage to avoid reloading assets?

The previous discussion in #332 decided to abandon this due to needing server-side support.

However, it is possible to manually set the "If-Modified-Since" header on XMLHttpRequest, avoiding a specialized server:
http://en.wikibooks.org/wiki/JavaScript/XMLHttpRequest#Caching

You will also have to store the value returned in the "Last-Modified" header when loading the asset to send this later in the "If-Modified-Since" header.

That said, this still may be functionality better left to a plugin, but I don't know how hackable the Loader is from plugins.

@photonstorm
Copy link
Collaborator

This is an interesting request. It's not something I will do for the 2.0 release, but I have added it to the README file under the Road Map, so it's not forgotten. Going to close this for now though.

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

2 participants