local storage on window unload event

后端 未结 1 683
清酒与你
清酒与你 2021-01-18 07:00

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

相关标签:
1条回答
  • 2021-01-18 07:26

    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?

    0 讨论(0)
提交回复
热议问题