Ask Your Question
1

Regarding Draft autosave feature.

asked 2013-04-04 10:00:40 -0500

pajju gravatar image

There is draft auto-save feature, Cool addition!

  • How often does this save happen?
  • How does this work?

Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-04-04 10:17:12 -0500

Evgeny gravatar image

Saves draft every 30 seconds on on page unload, so you don't lose whatever you've typed.

For doing this on page leave there is a trick, "ajax" request must be sent synchronously - as browsers don't allow to fully hijack the page unload event - and the event to run it on is "onbeforeunload".

On the javascript side there are two classes DraftQuestion and DraftAnswer that subclass DraftPost.

edit flag offensive delete link more

Comments

Thanks for this detailed response.

pajju gravatar imagepajju ( 2013-04-04 11:44:21 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-04-04 10:00:40 -0500

Seen: 39 times

Last updated: Apr 04 '13