Saving data for any entered field

Hello;

Is it possible to save any entered data in the fields without need to click on save button?
Why I need this? Because, if the user entered any data in any field and by mistake click on any link or suddenly closed the browser or shutdown the PC, the entered data will be missed.
That is why I need the data to be save whenever it is entered. HOW?
It is really hard to add custom script for each field to do save for any change in the field. Is there any other alternative way?
One more thing: is it possible to disallow closing the browser without saving?
Regards
Bilal

This is a very unique requirement, maybe you could build something custom for this.