慕粉15102700706
2017-11-19 17:22
while(off){
if(isleft){
end=base-(off/2);
}else{
end=base+(off/2);
}
sstr=str.slice(0,end);
localStorage.clear();
try{
localStorage.setItem('cache',sstr);
limit=sstr.length;
isleft=0;
}catch(e){
isleft=1;
}
base=end;
off=Math.floor(off/2)
}
				检查localstorage的最大大小
前端性能优化-通用的缓存SDK
24881 学习 · 58 问题
相似问题