Hi,
Trying to put together my first snippet. It’s a domain name checker that gives the user whois information if the domain is registered and a link to register the domain if it’s available.
Everything seems to work apart from when I try to go back to the form by hitting the browser’s back button or by clicking the form "back" button I’ve written into the script, I get "Warning Page Expired" error in IE. I figured this must be something to do with caching so I’ve tried calling the snippet cached/uncached and tried setting the page to cahced and not cached and all combinations of the above.
Still happening. Can anyone tell me what I’m doing wrong?
Thanks!
it tels ie to not try to reload the page but to get it from cach
-
☆ A M B ☆
- 24,524 Posts
Normally, when you try to return to a page where you filled in a form, the form fields (POST) is still available in the browser, including the value from the submit button. The warning is the browser letting you know this. If the receiving page is not coded correctly, all that returning to the page will do is re-submit the same information you already submitted, i.e. the POST values will still be available. That is why a well-crafted script will have something to store and compare a static value (like a timestamp or a generated random value in a hidden form input field), and will simply display the empty form without processing the POST if the values are the same.