Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

缓存改用ServiceWorker+CacheStorage+IndexedDB #33

@maizi20

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

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