apache / incubator-pagespeed-ngx

Automatic PageSpeed optimization module for Nginx
http://ngxpagespeed.com/
Apache License 2.0
4.36k stars 363 forks source link

Blackberry: QuotaExceededError: DOM Exception 22: An attempt was made to add something to storage that exceeded... #1084

Open deweydb opened 8 years ago

deweydb commented 8 years ago

Hello,

I've noticed blackberry users having DOM Exceptions caused by pagespeed's javascript attempting to add (what i presume, is too many) items to local storage. At this point in the code:

q.prototype.f=function(b,a){var c=window.localStorage.getItem("pagespeed_lsc_url:"+b+" pagespeed_lsc_hash:"+a),f=document.createElement("img {snip}

Browser info:

browser = BlackBerry WebKit
device = BlackBerry Kbd
level = errorlogger = javascript
os = BlackBerry OS 10.3.2
url = https://bid13.com/storage-auctions/x-s-storage/unit-838-o

I do have this filter enabled, i assume that by disabling it this error may be avoided, but i would prefer to not have to disable it just because blackberry sucks.

pagespeed EnableFilters local_storage_cache;

Please let me know if i can provide more information.

jeffkaufman commented 8 years ago

Thanks for the report!

What UA were you seeing this with?

deweydb commented 8 years ago

Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML, like Gecko) Version/7.2.1.0 Safari/536.2+

deweydb commented 8 years ago

and also:

Mozilla/5.0 (BB10; Kbd) AppleWebKit/537.35+ (KHTML, like Gecko) Version/10.3.2.2639 Mobile Safari/537.35+

jmaessen commented 8 years ago

I've opened a bug for this:

https://github.com/pagespeed/mod_pagespeed/issues/1236

Will take a look; we should cope gracefully with lack of local storage if it's present but small.

On Mon, Jan 4, 2016 at 9:59 PM, deweydb notifications@github.com wrote:

and also:

Mozilla/5.0 (BB10; Kbd) AppleWebKit/537.35+ (KHTML, like Gecko) Version/10.3.2.2639 Mobile Safari/537.35+

— Reply to this email directly or view it on GitHub https://github.com/pagespeed/ngx_pagespeed/issues/1084#issuecomment-168878533 .

deweydb commented 8 years ago

I'm now getting this bug happening in other browsers, like Google Chrome desktop

Uncaught QuotaExceededError: Failed to execute 'setItem' on 'Storage': Setting the value of 'pagespeed_lsc_url:https://bid13.com/sites/default/files/imagecache/product_list/19-1_0.jpg pagespeed_lsc_hash:FceD9qKAq8' exceeded the quota.