Skip to content

缓存改用ServiceWorker+CacheStorage+IndexedDB #33

Description

@maizi20

可以参考这个:https://github.com/maizi20/zipped-plab
原因:
localStorage有MB级的存储上限,
并且物实图床有防盗链,跨域请求只能noreferr得到不透明请求
没有后端的情况下缓存不透明请求的唯一方法就是CacheStorage
indexedDB兼容性比较好并且支持索引,
不用OPFS是因为某现代IE不支持FileSystemFileHandle.prototype.createWritable
详见:https://developer.mozilla.org/zh-CN/docs/Web/API/FileSystemFileHandle#%E6%B5%8F%E8%A7%88%E5%99%A8%E5%85%BC%E5%AE%B9%E6%80%A7

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