Skip to content

Cache to localStorage using If-Modified-Since #495

Description

@bburky

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions