Skip to content Skip to sidebar Skip to footer

Local Storage On Window Unload Event

I'm using local storage to store some data: the user makes ajax requests to get information and I'm storing the result in storage so that next time he requests the same info, I fir

Solution 1:

window.unload may not be invoked under a number of circumstances, for instance if the user closes the tab or if the browser crashes. Why not save the data to localStorage periodically, as a precaution?


Post a Comment for "Local Storage On Window Unload Event"