Not all browsers run Javascript. And not all keep the form populated when you go back.
The safer way to handle it is, when you see a field is empty, is to redraw the page and the form, populate all the fields that they did enter and show red boxes around any fields they left blank.