272

Many times it takes me a while to properly compose my question before posting. Sometimes it's just a jumble of ideas and concepts, and is not something I'd want seen immediately. However, there is no way to save a partial question unless you post it.

This should work exactly like it does in Gmail. There, once you start composing your question, it's autosaved as a draft. If your browser crashes or you need to come back later to complete it, it will be there for you to finish and post later.

Optionally, allow multiple draft questions and a page to edit/delete them. If needed, make them expire after some amount of time.

16
  • 4
    Would I like this? Yes. Is it feasible? I'm not sure. Especially because if this is implemented for questions, people will want it for answers and maybe even comments... Commented Jun 30, 2009 at 15:35
  • 16
    It's less "useful" for answers as there is always the urge to post the first answer and then "tart" it up later.
    – ChrisF Mod
    Commented Jun 30, 2009 at 15:37
  • 4
    It shouldn't take ages to craft a comment. And for answers I see it as a middle ground type of need because answers rely on speed a lot more than questions do if they want to score better.
    – TheTXI
    Commented Jun 30, 2009 at 15:37
  • 5
    Best idea yet, draft question or answer can then be retrieved from where ever you are connected. Commented Jun 30, 2009 at 16:23
  • 4
    +1 for drafting questions only. ChrisF's right, most people just treat the answer board as a sort of drafting area
    – bobobobo
    Commented Jul 14, 2009 at 0:33
  • Please don't take offence - but please could you use correct grammar for the title of this question? I think it will make people pay more attention. I'd really like to have this feature. Also, why is this a community wiki? It's not subjective or anything - you could have racked up a lot of rep points. Cheers! Commented Jan 10, 2010 at 8:01
  • @ChrisF: this urge is not always there, it would be very useful for answers if nothing else, to protect against crashes (some answers involving code can be quite elaborate)...
    – user148312
    Commented Jun 27, 2010 at 14:38
  • 1
    OK, a year in 'status-deferred' mode is long enough. Please bust this feature out.
    – Dhaust
    Commented Jun 28, 2010 at 2:03
  • @David - I think you misunderstand "status-deferred". It's not usually "deferred until later". It's "deferred to someone else to implement or fix." For example, a bug caused by a flaw in a browsers javascript implemention my be deferred to the browser vendor to fix (or it might not). A feature request that can be easily accomplished with a third-party solution might be deferred to the third party. In this case, it's the latter. Commented Jun 29, 2010 at 15:26
  • 2
    Shouldn't that be status-delegated or status-not-us?
    – bobobobo
    Commented Jun 29, 2010 at 20:51
  • 1
    @Joel Coehoorn - I know arguing with a Mod about this is kinda dumb...but what the hell. If you look through the [status-deferred] questions, it seems the tag is used almost exclusively to mean 'we'll get to that later if it becomes important' (which I totally get and agree with). But as Bobo pointed out, if it's meant to mean 'Gee we wish a 3rd party would fix this', a new, more accurate tag should really be created for that.
    – Dhaust
    Commented Jun 30, 2010 at 5:50
  • @David - it handles both. Sometimes deferred to later, sometimes deferred to an outside fix or workaround. Commented Jun 30, 2010 at 21:04
  • 2
    @Joel: why voluntarily assign two meanings to one tag when it would cost next to nothing to create two unambiguous tags instead?
    – Pops
    Commented Aug 10, 2010 at 13:21
  • If this feature gets implemented (I doubt it, but still, fingers crossed), we should have some sort of auto-save every few minutes, too. If the team doesn't implement this for the sites, I'll work on something similar once v2 of the API is released. Commented Aug 13, 2010 at 19:11
  • @David, @Joel, this is now complete by all definitions of complete. drafts for questions even work for the anonymous user.
    – waffles
    Commented Oct 20, 2010 at 4:39

12 Answers 12

140

This is now complete for answers and new questions.

If you start asking a question, but do not successfully submit, you will see your last saved question draft the next time you visit the ask a question page.

If you start answering a particular question, but do not successfully submit, you will see your last saved answer draft the next time you visit that particular question page.

  • We save drafts automatically for all new answers and new questions once every 45 seconds.
  • Drafts are not supported on self-answers.
  • Drafts are not supported on edits.
  • You only get one draft for an answer and one for a question. (If you start a new post, the old draft is cleared.)
  • Each site has its own draft storage, e.g. you can have multiple draft questions saved on multiple Stack Exchange sites
  • Drafts will be automatically cleared after a week.
  • Drafts work for anonymous users as well.

Also:

  • Pending answer draft is cleared on successful submission of any answer.
  • Pending question draft is cleared on successful submission of any question.

Last but not least, technical details about the draft mechanism can be found here:

Drafts are stored in redis for 7 days.

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.

35
  • 6
    +1 for rebinding ctrl+s, this is totally going to save me hitting the damn cancel dialog because of my habitual key-pressing Commented Oct 1, 2010 at 1:53
  • 3
    Ctrl+S in Firefox both saves the draft and brings up the "Save Webpage As" dialog. I don't think using that key binding is going to work. Add a Save button in the toolbar.
    – Jon Seigel
    Commented Oct 1, 2010 at 3:09
  • 3
    @Jon gmail manages to get this working in firefox, so there must be a way
    – waffles
    Commented Oct 1, 2010 at 4:13
  • 2
    @Jon I fixed Ctrl+S in firefox ...
    – waffles
    Commented Oct 1, 2010 at 7:18
  • 2
    ...so that's how I ended up with a draft saved. I was wondering about that.
    – Grace Note StaffMod
    Commented Oct 1, 2010 at 19:46
  • 1
    It's great to have draft answer, but isn't this question for draft question? Maybe the OP's acceptance was a draft? Commented Oct 4, 2010 at 3:24
  • 2
    @Geoffrey, yes this is only partially complete ... we need 2 new separate topics to track, one for edit drafts and another for question drafts.
    – waffles
    Commented Oct 4, 2010 at 5:18
  • 2
    @waffles: then wouldn't it be more appropriate to open a trivial "draft answer" request and mark that as status-complete, while keeping this request as status-deferred? Now it misleads people (like me) to believe that draft question has been implemented. Commented Oct 4, 2010 at 14:39
  • 2
    @Geoffrey ... its status complete now .
    – waffles
    Commented Oct 20, 2010 at 4:41
  • 2
    #2 no longer exists. Is the save draft keyboard binding broken?
    – Brandon
    Commented Nov 10, 2010 at 15:11
  • 1
    @waffles: Is the draft-saving implemented server-side or client-side?
    – Jon Seigel
    Commented Nov 23, 2010 at 23:32
  • 3
    @Jon .... server side
    – waffles
    Commented Nov 24, 2010 at 14:44
  • 1
    Thanks for activating this feature. Stupid question, but where do I access my saved draft question if I navigate away? Commented Dec 2, 2010 at 5:47
  • 2
    @waffles, are you considering to implement multi-draft savings? this really compelling, cuz sometimes I start writing a question/answer, and don't have enough details or I find a temporary workaround, then I want to write something else and I want to leave the previous and get back to it after a week/month/facing back the issue etc. Commented Feb 10, 2011 at 3:29
  • 4
    @waffles: It appears that drafts do work for self-answers - I just tested it myself. Is this a glitch? I hope not; in fact, I see no reason why drafts shouldn't be supported for self-answers. Commented Sep 28, 2011 at 15:33
40

gmail has drafts, blogger has drafts, outlook has drafts (connected to remote exchange server I can edit email later), I think youtube has draft like feature where you don't publish something until you're done editing... and it's all in the cloud.

I usually look at stackoverflow at the end of work hours (more then usual), I see question I want to answer, I start typing, but I remember I have to go. I can finish it later at home. So do I save it in gmail drafts, google documents, on exchange server, in notepad then save document on usb drive and then take it home ?

I really can do any of this, but I still think it would be nicer to have drafts for posts, where I want to post.

If needed, make them expire in some amount of time.

to expire item would be good thing, to protect SO database from too many drafts.

Maybe to require certain amount of reputation to be able to make drafts ?

just my thoughts...

23

We need this feature! I'm not sure why it was deferred, because this seems like a big productivity plus.

As explained in the other answers here, such a feature should be similar in functionality to how Gmail works with drafts - if I'm drafting an email, it auto-saves, and then I can wait before sending it.

When writing a question or an answer, such functionality would have multiple benefits:

  • Prevents data loss from crashes - let's say that I'm writing a question and I want to paste in some sample code, so I go into my IDE, with Stack Overflow open in a browser window/tab, and boom! My computer/browser crashes. All the question data I was just writing is lost.
  • Switch computers while writing - I often get ideas for questions right before I have to leave somewhere (I have no idea why this is, though). This means that I either have to quickly write my question, thus delaying my trip and affecting the quality of the question. As Gmail allows, I want to be able to start writing a question (or at least write the title and a few lines of notes/ideas), save it, and continue writing it from another location.

If such a feature is implemented, it should apply to both questions and answers. While it would be more useful for questions, the first reason I stated above applies to answers, too. However, questions don't really have a specific time cycle (nothing will change if you don't ask the question right now, but instead, ask it tomorrow), while with answers, the original question and its answers will probably change. Who knows, maybe a great answer will have been accepted already, but the draft feature is still necessary.

On another note, I'm not sure we would need to purge drafts, well, maybe rarely (once every year would eliminate any problems with this), but we can discuss this later.

Such a feature would be awesome. Wouldn't you want your question/answer to be auto-saved while you're writing it?

0
13

+1. Often when I am typing up a new question, I come up with possible solutions to the problem, because formulating the question forces me to think about it from a different perspective. In these cases, I wish I could "save" the draft question I typed up so far, to spend some time trying out the solution that I envisioned. So if the idea doesn't work out in the end, I can come back and continue writing up my question.

They say, every solution is obvious if you know how to ask the right questions.

1
  • 2
    Shouldn't you leave the question there and answer it yourself? That way the next time someone wants to know the answer, they can just see what was there?
    – clahey
    Commented May 6, 2010 at 21:19
8

At first glance I was going to say "just copy/paste it to notepad" but your point about sudden crashes and the like makes sense to me enough to vote this up.

2
  • 2
    copy/paste into gmail :) Commented Jun 23, 2010 at 21:15
  • gmail??????????
    – user298438
    Commented Jun 8, 2018 at 14:56
6

I agree. There were times I answered a question, then had it revoked because it "wasn't a question" while I was editing it. Then I had to post another question from scratch.

5

I totally second this. There is a number of questions I am working on in odd free minutes here and there. It would be great to have the markdown editor available when working on the question.

0
5

I definitely need this! Every day I come up with silly meta questions that shouldn't be posted yet, and when Friday rolls around, nothing! It's frustrating!

Actually I'd like a deferred posting option. I know my questions posted at late hours or on weekends aren't going to get answered, and I don't want to keep track of them so I can bump them. Would be nice to make a draft and set it up to automatically post during a weekday.

5

Whilst you can formulate the question in any editor of your choice (or somewhere like a Google doc if you want machine independence) I think there are two cases in which it would be useful:

  • when you have already started typing and temporarily change your mind.
  • when SO gives you suggestions for other posts that might answer your question (and you want to follow those up first).
4

This sort-of exists. You can just delete the question and keep it around, then undelete it.

2
  • 1
    You've got to be able to find the question again - and for < 10K users that's next to impossible.
    – ChrisF Mod
    Commented Nov 17, 2009 at 21:28
  • @ChrisF Wait didn't you just answer my question about this yesterday? meta.stackexchange.com/questions/31618/… It shouldn't be that hard to find...or can't you search questions that you want to re-open?
    – leeand00
    Commented Dec 3, 2009 at 22:32
1

I'm guessing this request addresses the basic need to write down any questions that spring to mind until you refine them (in your mind), kind of like the "note-to-self voice recorder" gag we see in sitcoms...

What I would like to see is, based on current ability to recognize "possible duplicates" and similar, to analyze the draft questions and assign visible "points" based on validity. The logic is, if your one question gets analyzed for possible duplicates /matches, why not have a whole bunch of "unasked" questions contribute to the algorithm... Then you could have your elimination process graded and get suggestions on what you might (wanted to) ask, and also the ability to add and remove data points (question drafts), influencing the algorithm.

Not really a feature request, more of an idea...

0

Playing devil's advocate here:

You could compose the question in your editor of choice[*] over a period of time and then copy and paste into SO when it has reached its final glory.

[*] especially one that had autosave.

UPDATE & CLARIFICATION

I'm not saying that the idea was a bad idea - just that there are other existing alternatives. TheTXI and Diago have put forward very good reasons why being able to save drafts on the site would be useful & I agree with them.

There could also be a prompt (like for unaccepted answers) if you've started a draft and not published it after N days.

6
  • 1
    One problem I can see with this would be that you may not have the same editor capabilities (such as code highlighting, quoting, etc.) that you would need to properly format your question.
    – TheTXI
    Commented Jun 30, 2009 at 15:36
  • You can use the markup to format it in an editor, ** for bold, _ for italics, ` for code block. Commented Jun 30, 2009 at 15:40
  • 1
    Also you may not always be on the same computer. I start a question at work, leave for home, and finish the question at home. With 2 different computers in use I can come back at any time, in any browser and complete my question. Commented Jul 1, 2009 at 12:35
  • 1
    @Diago - I did say I was playing devil's advocate ;) Both you and @TheTXI have raised good points in favour of having the ability to save draft questions on the site.
    – ChrisF Mod
    Commented Jul 1, 2009 at 12:46
  • I agree, I don't see a lot of value in reimplementing something that you and your browser can do for you. (FWIW, I do most of my post edits in vim/gvim using the wonderful Firefox plugin "It's All Text!")
    – Ether
    Commented Nov 17, 2009 at 22:17
  • I agree too. I really do not see a lot of value in reimplementing something that you and your browser can do for you, too.
    – user298438
    Commented Jun 8, 2018 at 14:57

You must log in to answer this question.

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