How to make the data stored in localstorage have an expiration time of 24 hours? my idea is to store an attribute of the current time at the same time, and then use a timer to traverse the attribute and clear it when it expires. however, I think this method is too inefficient. do you have any other ideas?
Don’t use timing, just calculate the time every time you use it. . .