First time here? Check out the FAQ!
1

Regarding Draft autosave feature.
 

There is draft auto-save feature, Cool addition!

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

Thanks.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
pajju's avatar
565
pajju
asked 12 years ago

Comments

see more comments

1 Answer

1

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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 12 years ago
link

Comments

Thanks for this detailed response.

pajju's avatar pajju (12 years ago)
see more comments