Cordova App中LocalStorage / IndexedDb的最大大小限制

时间:2016-03-08 09:37:27

标签: cordova local-storage indexeddb

html5 localstorage&的最大限制是多少?在cordova应用程序中使用IndexedDb存储?

1 个答案:

答案 0 :(得分:2)

这取决于您的Cordova App运行的浏览器。查看从here获取的表可能有所帮助。整篇文章也可能是有意义的;)



<table border="1">
  <tbody>
    <tr>
      <th></th>
      <th>Chrome</th>
      <th>Android Browser</th>
      <th>Firefox</th>
      <th>Safari</th>
      <th>Safari</th>
      <th>iOS WebView</th>
      <th>iOS WebView</th>
    </tr>
    <tr>
      <th></th>
      <th>40</th>
      <th>4.3</th>
      <th>34</th>
      <th>6, 7</th>
      <th>8</th>
      <th>6, 7</th>
      <th>8</th>
    </tr>
    <tr>
      <td>Application Cache</td>
      <td>up to quota</td>
      <td>Unlimited?</td>
      <td>5<span class="mb">MB</span>, Unlimited</td>
      <td>300<span class="mb">MB</span>?</td>
      <td>300<span class="mb">MB</span>?</td>
      <td>100<span class="mb">MB</span>?</td>
      <td>100<span class="mb">MB</span>?</td>
    </tr>
    <tr>
      <td>FileSystem</td>
      <td>up to quota</td>
      <td class="empty"></td>
      <td class="empty"></td>
      <td class="empty"></td>
      <td class="empty"></td>
      <td class="empty"></td>
      <td class="empty"></td>
    </tr>
    <tr>
      <td>IndexedDB</td>
      <td>up to quota</td>
      <td class="empty"></td>
      <td>5<span class="mb">MB</span>, Unlimited</td>
      <td class="empty"></td>
      <td>up to quota?</td>
      <td class="empty"></td>
      <td>up to quota?</td>
    </tr>
    <tr>
      <td>WebSQL</td>
      <td>up to quota</td>
      <td>200<span class="mb">MB</span>~</td>
      <td class="empty"></td>
      <td>5<span class="mb">MB</span>, 10<span class="mb">MB</span>, 25<span class="mb">MB</span>, 50<span class="mb">MB</span></td>
      <td>5<span class="mb">MB</span>, 10<span class="mb">MB</span>, 25<span class="mb">MB</span>, 50<span class="mb">MB</span></td>
      <td>50<span class="mb">MB</span></td>
      <td>50<span class="mb">MB</span></td>
    </tr>
    <tr>
      <td>LocalStorage</td>
      <td>10<span class="mb">MB</span></td>
      <td>2<span class="mb">MB</span></td>
      <td rowspan="2">10<span class="mb">MB</span></td>
      <td>5<span class="mb">MB</span></td>
      <td>5<span class="mb">MB</span></td>
      <td>5<span class="mb">MB</span></td>
      <td>5<span class="mb">MB</span></td>
    </tr>
    <tr>
      <td>SessionStorage</td>
      <td>10<span class="mb">MB</span></td>
      <td>Unlimited</td>
      <td>5<span class="mb">MB</span></td>
      <td>Unlimited</td>
      <td>5<span class="mb">MB</span></td>
      <td>Unlimited</td>
    </tr>
  </tbody>
</table>
&#13;
&#13;
&#13;