移动端LocalStorage缓存资源方案
安装
npm install mobot
使用
mobot . timeout = 10000 ; // 请求超时10s
mobot . prefix = 'mobot-' ; // LocalStorage前缀
mobot . expire = 24 * 7 ; // 7天的缓存时间
mobot . require ( [
{
url : 'https://www.xxx.xxx/static/styles.123.css' ,
key : 'styles' ,
unique : '123' ,
cache :