Skip to main content
added 33 characters in body
Source Link
Kevin Reid
  • 5.7k
  • 22
  • 30

Approaches to, not incremental saves, but finding time for a full save:

  • onunloadonunload, as previously mentioned. I have found this to be reliable (but using localStoragelocalStorage, not network, which may change things).
  • Save when your window loses focus.
  • Save periodically on a timer, adjusted to: when the last save has not been in n minutes and the user has not made any input recentlyin m seconds.

Approaches to, not incremental saves, but finding time for a full save:

  • onunload, as previously mentioned. I have found this to be reliable (but using localStorage, not network, which may change things).
  • Save when your window loses focus.
  • Save periodically on a timer, adjusted to when the user has not made any input recently.

Approaches to, not incremental saves, but finding time for a full save:

  • onunload, as previously mentioned. I have found this to be reliable (but using localStorage, not network, which may change things).
  • Save when your window loses focus.
  • Save periodically: when the last save has not been in n minutes and the user has not made any input in m seconds.
Source Link
Kevin Reid
  • 5.7k
  • 22
  • 30

Approaches to, not incremental saves, but finding time for a full save:

  • onunload, as previously mentioned. I have found this to be reliable (but using localStorage, not network, which may change things).
  • Save when your window loses focus.
  • Save periodically on a timer, adjusted to when the user has not made any input recently.