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 in
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?