All HTML assets share the same localStorage. So, when setting values with setItem, add a prefix to them with asset name or any unique identifier, so changing values in one asset won’t affect others. Similar applies for deleting with e.g. localStorage.clear(), this will delete local storage for ALL HTML assets. Be careful!
Also localStorage is persistent even when asset is updated or removed. Please keep in mind that local storage has limited size (~2.5MB).
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article