17

As per the title, curious about any implementation details that can be revealed.

I don't see any details in the StackExchange Data Explorer that indicate how they might be stored.

Particularly, I'm curious about whether or not it's stored on the client side, the server side, a combination of the two (e.g. a cookie that the server uses) and any underlying details that can be exposed.

1

2 Answers 2

20

Drafts are stored in redis for 7 days, with each site having storage for one draft question and one draft answer per user.

For anonymous we use cookie to track the user.
For non anonymous we use the user id.

We ship it to the server in the heartbeat (once a minute or so), the heartbeat also notifies you when new answers were added in the banner on the top.

We only store drafts for new answers and new questions, not for edits.

3
  • 5
    What is “redis” ? Commented Jun 21, 2013 at 0:16
  • 1
    Too bad that edits don't get auto-saved. So I just lost a long and nice writing of an answer (thanks to a Web browser crash), and I will not write it again. Commented Jun 21, 2013 at 0:18
  • Since this is stored in memory, is it lost when machines are rebooted? (If so, then I'll edit this into the answer.) Commented Aug 8, 2018 at 15:44
8

I don't know everything, but I can answer your specific question: it's on the server side. You can save a draft on one computer and load it on another.

Ah, apparently waffles confirmed this in a comment under this answer:

@waffles: Is the draft-saving implemented server-side or client-side? – Jon Seigel Nov 23 '10 at 23:32
@Jon .... server side – waffles♦ Nov 24 '10 at 14:44

1
  • 1
    Many thanks, am looking for more specific details of course, but thanks for getting it rolling.
    – casperOne
    Commented Nov 4, 2011 at 14:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .