Back/Forward and JS + XHR + URL Manipulation
Saturday, October 18th, 2008Steps to reproduce:
- Go to your Facebook inbox page, pick a random message, and start typing a reply
- Halfway through, realize you want to read a different message before finishing this one.
- ‘Accidentally’ left-click instead of middle-click the link at the top for the inbox.
- Hit escape to stop the load so as to be able to still have the text you type
Expected result:
Stop loading the inbox page, get to keep your written stuff
Actual result:
This is JavaScript executing. There’s no stopping it from throwing away your text anymore by returning to the inbox – and what’s worse, the back/forward history is so confused by what’s going on (as you hit escape) that it won’t be able to take you back to the reply page and restore your message to the textbox (as back/forward generally does in Firefox). Congrats, you just lost N minutes worth of typing, and who knows what kind of brilliant ideas!
Question to the Lazyweb: whose fault is this? Can it be fixed? How? (Yes, I’d prefer to just use email all the time, too, but unfortunately that’s not always an option, and I’m sure there are webmail implementations which have similar problems, especially once you turn off automatic draft saving)