You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The referenced code sorts all localStarage items managed by basket.js and removes the oldest entry (recursively, until no error is thrown).
Private mode in Safari hower, throws the QuotaExceededError when accessing localStorage, so it can't store anything. MDN gives an example how to handle this.
While debugging a site in iOS I saw that my home-baked localStorage caching script was failing in private mode:
QuotaExceededError: DOM exception 22: An attempt was made to add something to storage that exceeded the quota
I see that you check for this error here: https://github.com/addyosmani/basket.js/blob/gh-pages/lib/basket.js#L15 — could you explain for the layman what's happening here and how basket.js handles caching of resources during private browsing (if at all)?
The text was updated successfully, but these errors were encountered: