Back button reloads page - problem for POST pages




16 years ago
16 years ago


(Reporter: levik, Assigned: bugzilla)


Firefox Tracking Flags

(Not tracked)





16 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021029 Phoenix/0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021029 Phoenix/0.4

(This may be a mozilla-specific bug.)

Going back using the back button causes Phoenix to reload the page instead of
showing the instance of a page that was previously loaded. While in most cases
this behavior has both pros and cons, here is an example when it completely breaks:

A user just performed some action involving a large form POST (say sending an
email through the web), and sees a result page (page1). The user click the link
on the result page to go to some other page (page2). The user now wants to back
up, and click a different link on page1 to go to page3. But when he hits the
back button, he is told that the page was generated from a POST request, and
asked if the data should be re-sent. Clicking "Yes" will re-perform whatever
action the user took to get to "page1" (for example send the email message
again). Clicking "No" will leave the user on "page2" with no way of getting to
"page3" where they want to go.

At least for pages resulting from a POST, the browser should show the cached
version upon back-navigation, instead of re-performing the request.

Reproducible: Always

Steps to Reproduce:
1. Find and submit a POST form
2. Click a link on the resulting page
3. Click "back"

Actual Results:  
Dialog asks wether to re-send POSTDATA, neither option produces expected results
of hitting "back"

Expected Results:  
User should see the page they have just visited, with no further data sent to
the webserver.
Funny, bug 180598 says exactly the contrary. I also don't think that page are
reloaded when you hit the back button.

Reporter, could you please try with a recent build and a new profile, and
provide an URI (since it could be a problem with a server sending a
Pragma:no-cache HTTP header) ?

Comment 2

16 years ago
Here is a URL I have found to replicate this:

1. In the login box, put in some gibberish, and click "Log In"
2. Get a "login incorrect" page.
3. Click one of the links up top.
4. Hit back.

I am using the latest release of Phoenix, and for me it asks to re-post the data
whenever I back-navigate to a page coming from a POST. I believe the scenario I
outlined above would make this behavior wrong EVEN IF the page requests not to
be chached. Having a BACK button gives the user an expectation to see the page
they just came from without triggering any further actions, and this is exactly
how it works in IE and Opera to my knoweledge.
The URI you gave says explicitly to reload the page. The server sends the
following HTTP headers:

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache

So, Mozilla/Phoenix must not cache the page, and they have to reload it when an
user hit the back button.
If the browser isn't told not to cache the page, then it'll use the cache when
you hit Back.

-> Marking INVALID.
Last Resolved: 16 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.