Iphone localStorage “QUOTA_EXCEEDED_ERR” issue

前端 未结 5 1947
孤街浪徒
孤街浪徒 2020-12-30 02:19

I trying to use Client Side Storage available in HTML5 (localStorage) for Iphone Application , and I\'m completely aware of the \"QUOTA\" associated for loc

5条回答
  •  甜味超标
    2020-12-30 02:37

    Local storage quota is tied to domain, if you have other pages that use the data storage they may fill it up. Iterate the keys to find out whats there in the storage when you get the exception.

    try {
       // try to insert storage here
    } catch ( err ) {
       for ( var i =0; i < storage.length ; i++ ) {
           console.log ( storage.key( i ) )
        }
    }
    

提交回复
热议问题