How large is HTML5 session storage?

2019-01-18 01:54发布

问题:

Although the size of localStorage has been addressed in detail and there is a online test for it, I was wondering what the maximum size of sessionStorage is for the common browsers?

回答1:

According to this site, Firefox’s and Safari’s storage limit is 5MB per domain, Internet Explorer’s limit is 10 MB per domain.

However, according to this site which tests your web browser local storage capabilities, on my machine:

Browser        LocalStorage         SessionStorage
-------        ------------         --------------
Chrome              5M                   5M
Firefox             5M                Unlimited
IE10               4.75M                4.75M

Also, note the handy chart at the bottom of the page.



回答2:

Mobile

Browser | Chrome | Android Browser | Firefox | Safari | Safari | iOS WebView | iOS WebView
Version | 40     | 4.3             | 34      | 6, 7   | 8      | 6, 7        | 8
Max     | 10MB   | -               | 10MB    | 5MB    | -      | 5MB         | -

Desktop

Browser | Chrome | Firefox | Safari | Safari | IE      | IE
Version | 40     | 34      | 6, 7   | 8      | 9       | 10, 11
Max     | 10MB   | 10MB    | -      | -      | 10MB    | 10MB

Dash is Unlimited



回答3:

The amount able to be stored varries from browser to browser with IE being able to store up to a couple MB. It is also good to note that there is a vulnerabilty that allows an unlimited amount of data to be stored.