How to recover your failed post - the hard way

Posted by: cushman

How to recover your failed post - the hard way - 04/06/2006 01:33

I'm writing a reply in this forum, and taking my sweet old time submitting it. It's long. It's detailed. It has carefully constructed links. At this point I can't even remember what I said in it. When I finally get around to submitting it, the post fails. I hit the back button and my post text is gone! I look under the desk to make sure it didn't drop on the floor accidentally. It didn't. I'm screwed!

Ooorr am I?

I make sure not to close the tab (Firefox) with the post details. If I refresh, it gives me the "blah blah blah POST details blah refresh blah" popup window. So my text is there SOMEWHERE, right? What if I install an extension to view the POST details! Yeah, that will do it, sure! I'll just use one of those cool extension things to view the live headers and POST data as it... This extension will be installed the next time you restart Firefox. CRAP! I'm screwed!

Ooorr am I?

Code:
import java.io.*;
import java.net.*;

public class WebServer {

public static void main(String[] args) {
try {
ServerSocket server = new ServerSocket(80);
server.setSoTimeout(0);
Socket client = server.accept();
BufferedReader in = new BufferedReader(new InputStreamReader(client.getInputStream()));

String data = null;
while((data = in.readLine()) != null)
System.out.println(data);

} catch(Exception e) {
e.printStackTrace();
}
}

}


Edit c:\windows\system32\drivers\etc to add:

Code:
127.0.0.1    empegbbs.com


nbtstat -R on the command line, run my java app, refresh my browser and...

THERE YOU ARE YOU LITTLE POSTING! Get back in my textarea where you belong.
Posted by: FireFox31

Re: How to recover your failed post - the hard way - 04/06/2006 13:47

You, sir, are brilliant. If you actually constructed that during the frustration of just having lost a huge post, that makes it even better.

I'm in the habit of Ctrl-A Ctrl-C (select all, copy) my long posts before submitting. That and/or typing them in an Outlook task so I can spell check to avoid more public ridicule. Yeah yeah Firefox spell checker extension thing; someday.
Posted by: sein

Re: How to recover your failed post - the hard way - 05/06/2006 07:20

Genius.
Posted by: Daria

Re: How to recover your failed post - the hard way - 05/06/2006 12:36

gcore your web browser and then apply a debugger to the core?
Posted by: matthew_k

Re: How to recover your failed post - the hard way - 05/06/2006 13:17

I've never run into the problem on this board, but on others I've opened a new tab, logged in in that tab, and then hit reload and said yes to it posting the same form again.

Matthew
Posted by: tfabris

Re: How to recover your failed post - the hard way - 05/06/2006 18:40

Bravo for this great workaround.

It suck you had to MAKE this workaround to begin with, though. I think this kind of functionality should be built in to the browser. The browser shouldn't conveniently disappear the text you typed like they currently do.
Posted by: wfaulk

Re: How to recover your failed post - the hard way - 05/06/2006 18:52

The browser does. There's something about this BBS software that makes it forget. I don't know what, though.
Posted by: tfabris

Re: How to recover your failed post - the hard way - 05/06/2006 19:10

This BBS is not the only place I've seen browsers forget my form data. It happens everywhere.

I should be able to fill out a form, navigate away from the page, and press BACK, and the form data should still be there. No matter what the form, no matter how I navigated away (whether I hit submit or not), etc.

In my experience, my data is lost in most cases when I navigate away from a form.
Posted by: wfaulk

Re: How to recover your failed post - the hard way - 05/06/2006 19:13

That is not my experience. This is the only place I can think of where that is a problem.
Posted by: gbeer

Re: How to recover your failed post - the hard way - 06/06/2006 00:10

I've always been under the assumption this was intended, as a way to cut down on double posts. Though, what's that quote...

"Never attribute to malice, that which can be explained by stupidity."
Posted by: tfabris

Re: How to recover your failed post - the hard way - 06/06/2006 00:19

I'm not just talking about posting to forums, although it does happen. I also mean situations where you fill out some kind of web form, let's say it's a purchase and you have to enter your address and credit card details. Then you click on a link on that page either accidentally or purposely and it leads you away from the page. Or you click on submit and there is a server error. Or some other thing. Anyway, the point is, you've navigated away from the page and the submit either didn't work or you didn't do it. And now, when you hit back, all the form fields are blank again and you have to type all that shit over again.

Despite what Bitt says, this happens ALL THE TIME and MANY DIFFERENT WEB SITES in both firefox and IE. I'm sure we've all had it happen.
Posted by: wfaulk

Re: How to recover your failed post - the hard way - 06/06/2006 00:28

You are like a walking bug attraction zone.
Posted by: msaeger

Re: How to recover your failed post - the hard way - 06/06/2006 00:40

I have that happen too sometimes I thought it was due to the way they constructed the website.
Posted by: cushman

Re: How to recover your failed post - the hard way - 06/06/2006 01:04

Quote:
You are like a walking bug attraction zone.

That may be true, but I've had this happen to me many times also. Sometimes the developer of the webpage is at fault, they try to do something "smart" with the fields (using javascript, etc.) and end up clearing any previously entered data. I'm not entirely sure if that is always the case, but I'm too lazy to find the root cause of the issue.
Posted by: tfabris

Re: How to recover your failed post - the hard way - 06/06/2006 01:56

Quote:
Sometimes the developer of the webpage is at fault, they try to do something "smart" with the fields (using javascript, etc.) and end up clearing any previously entered data.

If that's the case, then maybe the ultimate thing would be a Firefox plug-in that automatically saves off form data and refills it when it detects that the web site is trying to erase it.
Posted by: canuckInOR

Re: How to recover your failed post - the hard way - 06/06/2006 17:01

Quote:
Quote:
Sometimes the developer of the webpage is at fault, they try to do something "smart" with the fields (using javascript, etc.) and end up clearing any previously entered data.

If that's the case, then maybe the ultimate thing would be a Firefox plug-in that automatically saves off form data and refills it when it detects that the web site is trying to erase it.

That sounds like a big security risk just waiting to be taken advantage of.
Posted by: StigOE

Re: How to recover your failed post - the hard way - 07/06/2006 06:22

Quote:
That sounds like a big security risk just waiting to be taken advantage of.

This sounds a bit like a security risk that was reported on Opera some time ago where you could hit the Back button and you would get the previous page back when you were on a SSL-site. Now it reloads that page.

Stig
Posted by: tfabris

Re: How to recover your failed post - the hard way - 07/06/2006 14:59

But that's exactly the situation I want to fix. That's the behavior I want. I want to be able to hit BACK and not have to retype my credit card number again.
Posted by: RobotCaleb

Re: How to recover your failed post - the hard way - 07/06/2006 16:20

But that's a horrible idea!
Posted by: frog51

Re: How to recover your failed post - the hard way - 07/06/2006 17:01

Any credit card page (or other sensitive info) should not only be protected (SSL or something equivalent) but forced to never cache.

Otherwise attacks become a piece of cake - believe me, organising attacks on web sites and servers is half my job, and it makes me laugh every time I see a wesite which allows such things.

Laugh in a sad way...