可以参考这个: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
wsxiaolin commentedon Feb 10, 2025
感谢!
我们已经说服了紫兰斋把成品丢在他的服务器,跨域问题交给后端
indexDB不错,我试着抽一个中间层出来
tutester166 commentedon Apr 6, 2026
还有建议把token和authcode放在sw的缓存里