Closed Bug 278930 Opened 20 years ago Closed 20 years ago

View source after "Back" sometimes displays source of former page

Categories

(Toolkit :: View Source, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 289544

People

(Reporter: lionellpack, Assigned: bugs)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0

I have had difficulty reproducing this reliably, but have observed it
erratically when going through the "Basic Web Hacking" component of
"www.hackthissite.org".

Sometimes, if you submit a POST form from a page ("the form page") and receive a
response ("the response page"), and then press the back button so you are once
again viewing the form page, then use the right-click context menu to "view
source", you will see the source code for the response page instead of the form
page.

Reproducible: Sometimes




I will submit further details when I am able to reproduce the problem reliably;
this is just an initial report in case the solution becomes obvious from the
problem description. In other words, unless the solution is obvious, DON'T try
to fix it until I give you more information.
I can reliably reproduce this bug.  I recently switched to FireFox and as a 
developer I am constantly using the back button and then viewing the source.  
This bug always occurs when the originating page uses the POST or GET method 
in a form.  When using "back" to return to the originating page and then 
attempting to view the source you will be presented with the wrong source.  
The source shown is for the page being posted TO.

The source returns to normal when you "refresh" the page and then "View page 
source".
(In reply to comment #1)
> I can reliably reproduce this bug...

I noticed this initially on a page deep within a site. I have not been able to
reproduce it, despite trying numerous pages containing forms (including search
engines, cgi tutorials etc.).

It would be appreciated if you could provide specific details of the
circumstances which reproduce the bug (web server version, firefox version, web
page etc.).
(In reply to comment #0)
> User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5)
Gecko/20041110 Firefox/1.0
> Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5)
Gecko/20041110 Firefox/1.0
> 
> I have had difficulty reproducing this reliably, but have observed it
> erratically when going through the "Basic Web Hacking" component of
> "www.hackthissite.org".
> 
> Sometimes, if you submit a POST form from a page ("the form page") and receive a
> response ("the response page"), and then press the back button so you are once
> again viewing the form page, then use the right-click context menu to "view
> source", you will see the source code for the response page instead of the form
> page.
> 
> Reproducible: Sometimes
> 
> 
> 
> 
> I will submit further details when I am able to reproduce the problem reliably;
> this is just an initial report in case the solution becomes obvious from the
> problem description. In other words, unless the solution is obvious, DON'T try
> to fix it until I give you more information.

I can also confirm that this bug is reproducable. But the interesting thing is
that I first noticed it, the source page was actually an image, as apposed to it
being the next page. If you start on the "the form page" and view the backgroudn
image for example, and then hit back, when I view that source, it has always
been an image code itself. Discovered Using Firefox 1.0 in Linux and was not
reproducable in OS X Firefox 1.0 and Windows Firefox 1.0.1. Server is a Apache
1.3.33. Linux OS is Ubuntu Hoary 5.04.
Anyone got a link that can reproduce this reliably?

Could it be possible that you're on forms that submit to themselves? Because
then the behaviour would make sense:

-Load form.cgi, which gives you a page where you fill in some fields. form.cgi
is stored in cache.
-Submit form.cgi, which submits to itself and shows you an OK message. The OK
message version of form.cgi overwrites the previous version stored in cache.
-Press back, and you're back on the input field form.cgi. Going back *doesn't*
store the result in cache.
-View source, and it looks up form.cgi in cache, which, at the last time you
loaded it, was the OK page. You see the OK page source.

*** This bug has been marked as a duplicate of 289544 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.