Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
111 views
in Technique[技术] by (71.8m points)

html - when i create localstorage in javascript garbage values auto created

When I create localstorage

await localStorage.setItem(item_id, JSON.stringify(products));

I Have garbage values debugbar-time, debugbar-time-new

I handle these garbage values like this condition's

if (x != 'debugbar-time-new' && x != 'debugbar-time' && x != '__mycart' && x!= 'favorite_tables')

But some time these values are change like _mycart, favorite_tables and I didn't use these words in my project. How can I handle these garbage values?

question from:https://stackoverflow.com/questions/65881990/when-i-create-localstorage-in-javascript-garbage-values-auto-created

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...