PDA

View Full Version : Show Friendly HTTP Error Messages and Back Button


steven_upton
05-18-2005, 02:04 AM
Hi

I have a problem with Internet Explorer 6 and using the back button after processing a HTML form. The application I am writing uses a single URL to navigate around our system.

Caching is disabled within the headers when writing back data using Cache-Control: no-cache. Caching has to be disabled as the application decides which page to load based on POST information.

I experience a Page Cannot be found IE error when I have the show friendly HTTP Error messages enabled within Tool / Internet Option / Advanced checked. When this page is displayed to the user, it loses the POST data and when refreshed, it automatically does a GET request from server but at this point I have lost all my POST request parameters, so I have no idea which page I have come from and where to load up the data from. Basically the application throws an error.

If I disable the show friendly HTTP errors I get the usual warning page has expired page and when the user refreshes, the data is posted to the server as expected.

The question is... how can I disable the Page cannot be displayed from ever occurring without relying on users to change their settings?

If I enable caching, then this fixes the problem, but is an unacceptable solution to my problem, as I need to POST the information to the server. Also I do not want to use Javascript to disable the back button.


Steve