Question

I have a web page that has a button that when clicked will download a file for the user. However after the download if the user clicks on the back button the previous form is displayed but the form fields are all blank.

If the user clicks back without performing the download then the form fields are automatically repopulated by the browser as expected.

This bug happens in IE6 and 7 but seems to be OK in 8 which suggests it was a bug that has been fixed in IE8.

Anyone have any idea how I might work around this in IE6 and 7?

Was it helpful?

Solution 2

I think we are going to rewrite the page to replace the use of the browser back button with a postback to return the user to the original page. Then we can pass the original form data back and repopulate the form programatically.

OTHER TIPS

There is definitely nothing you can do on the server side, as the browser does not inform the server when the user presses the back button. I'm not even certain if the browser has an event that you can use JavaScript to capture, but if there is a solution, it would have to occur on the client side.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top