Are there any plans to support erasing records from localStorage (and sessionStorage)?
Thank you for your work on this plugin.
Proposed solution
This would involve modifying the cookie helper functions to extract keys from the Storage instances, filter matching cookies, and remove them.
The internal implementation wouldn't be too complicated to add (see example below). I just don't know how this should be configurable for users integrating this plugin.
I think adding an option to delete items in localstorage is useful, but I don't agree on session storage ones, since they are deleted at the end of the browsing session.
Description
Are there any plans to support erasing records from
localStorage
(andsessionStorage
)?Thank you for your work on this plugin.
Proposed solution
This would involve modifying the cookie helper functions to extract keys from the
Storage
instances, filter matching cookies, and remove them.The internal implementation wouldn't be too complicated to add (see example below). I just don't know how this should be configurable for users integrating this plugin.
Option 1: `[category].autoClear.clear*Storage`
```js CookieConsent.run({ categories: { analytics: { autoClear: { clearLocalStorage: true, clearSessionStorage: true, cookies: [ { name: '_uetsid' } ] } } } }) ```Option 2: `[category].autoClear.cookies[].clear*Storage`
```js CookieConsent.run({ categories: { analytics: { autoClear: { cookies: [ { name: '_uetsid', localStorage: true, sessionStorage: true } ] } } } }) ```Option 3: `[category].autoClear.*Storage[]`
```js CookieConsent.run({ categories: { analytics: { autoClear: { cookies: [ { name: '_uetsid' } ], localStorage: [ { name: '_uetsid' } ], sessionStorage: [ { name: '_uetsid' } ] } } } }) ```The following is a stripped down working example I've tested on a client project (that does not implement the aformentioned configuration variants):
Additional details
No response