sandervanloock / HTMobieL

Thesis repos voor htmobiel.wordpress.com
2 stars 1 forks source link

exceeding storage quota on Chrome (Nexus 7) #12

Open miteyema opened 11 years ago

miteyema commented 11 years ago

The picture that was taken with the camera of the Nexus 7 is of a resolution 960x1280. It is successfully converted to base64. When storing it in the session storage, depending on the size of the picture, the console outputs the following error:

QUOTA_EXCEEDED_ERR: DOM Exception 22

This is because the picture is to large to hold in the session storage. If more than 2 local expenses are stored in the local storage, the local storage also exceeds the limit.

miteyema commented 11 years ago

Surrounded with try/catch block to catch the error. One possible solution is to resize the picture before storing.

miteyema commented 11 years ago

In fact, maximum size of localStorage and sessionStorage is 2,5 MB on Chrome, and also on iPad and iPhone (see http://dev-test.nemikor.com/web-storage/support-test/)