ZF-2915: Hash Element Problem with FF2 and IE7 (not tested with safari yet)

Description

While using FF2 and IE7 (not tested with safari, please check) when the user click on the back button the page is not reloaded, it is loaded from its own cache which creates the hash hidden form element with an incorrect value (an old value).

Comments

It makes sense. Because the browser sends its cached POST data again to the form without requesting it (the form). This is just the same as if some random user tries to POST some data to the form without requesting it.

I totally understand the back button problem though, but I don't think it belongs to Zend_Form. You should be looking at implementing the Post/Redirect/Get pattern. I've seen previous discussions on the list regarding achieving it in lower levels so almost all the work is done.

I've found that maybe this issue could be addressed by setting some headers like the expiration date at the same moment the form is created or a date before that. This will make the browser reload the page each time.

Please categorize/fix as needed.

Scheduling for next minor release.

How this will be fixed? I disagree with Amr Mostafa that this wouldn't be an issue. Actually I have used hash element to prevent resubmissions caused by back button.

I cannot reproduce this anymore in ZF 1.10.7. Don't know why...