Saved Drafts of new threads?

InstaFace

MDLzera
SoSH Member
Sep 27, 2016
9,457
I just had a massive new thread draft accidentally wiped by an inadvertent "Back" request to my browser. A page refresh (going Forward again) didn't call it back. Some quick thinking (closing the tab, then opening History and reopening the tab that way) seems to have resurrected it, but twas a close call.

I know that draft replies (in the "quick reply" box in a thread) are saved, seemingly every 30-60 seconds, on the server, and will be there if you refresh. But it seems, unless I'm mistaken, that the same is not true of draft new-threads, or even full replies if you go use the separate Reply page. Could it be easily made so? The board / our browsers eats posts for us all, sooner or later, and saving massive frustration is probably worth a little dev effort.

(I've contributed to the forum code before, so I'm happy to do it again if a tech doesn't want to bother but is willing to empower me to).
 

jon abbey

Shanghai Warrior
Dope
SoSH Member
Jul 15, 2005
46,922
I was under the impression that it does save them, and the way to get your text back is to start another new thread in the same section, and when that window opens, your text will be there. Did you try this and I'm just mistaken?
 

SumnerH

Malt Liquor Picker
Dope
Jul 18, 2005
25,963
Alexandria, VA
I was under the impression that it does save them, and the way to get your text back is to start another new thread in the same section, and when that window opens, your text will be there. Did you try this and I'm just mistaken?
That's correct. If you start a new thread and then close the window (or have a browser crash, or whatever), then you can recover the draft by going back to the same forum and hitting “New Thread”. This is probably what happened behind the scenes when InstaFace went to his history and returned to the “New Thread” page.

Note that drafts only save every 60 seconds, so you'll lose up to 1 minute of work in the event of a crash.

And old drafts are deleted after 48 hours if you don't return to them.
 

InstaFace

MDLzera
SoSH Member
Sep 27, 2016
9,457
That's odd then, because when I went back to the page, it was blank (and would have been from "the same section"), and likewise after refreshing the page. Maybe it was caching the initial load of the page, rather than re-pulling a newer version that would have contained the draft, and it was only after closing the tab and reopening from history that it fetched it anew.

Would some no-cache meta instructions help avoid this, or would they exacerbate it by preventing the browser itself from caching draft text?
 

Ale Xander

Lacks black ink
SoSH Member
Oct 31, 2013
23,634
I was under the impression that it does save them, and the way to get your text back is to start another new thread in the same section, and when that window opens, your text will be there. Did you try this and I'm just mistaken?
Yes this works. I accidentally closed the browser tab when doing the CFB OP and starting same thread brought 95% of it back.
 

Ale Xander

Lacks black ink
SoSH Member
Oct 31, 2013
23,634
That's odd then, because when I went back to the page, it was blank (and would have been from "the same section"), and likewise after refreshing the page. Maybe it was caching the initial load of the page, rather than re-pulling a newer version that would have contained the draft, and it was only after closing the tab and reopening from history that it fetched it anew.

Would some no-cache meta instructions help avoid this, or would they exacerbate it by preventing the browser itself from caching draft text?
don't go back.
 

SumnerH

Malt Liquor Picker
Dope
Jul 18, 2005
25,963
Alexandria, VA
That's odd then, because when I went back to the page, it was blank (and would have been from "the same section"), and likewise after refreshing the page. Maybe it was caching the initial load of the page, rather than re-pulling a newer version that would have contained the draft, and it was only after closing the tab and reopening from history that it fetched it anew.

Would some no-cache meta instructions help avoid this, or would they exacerbate it by preventing the browser itself from caching draft text?
Refresh should've worked. The back button is always wonky in situations like this.