Page triggers back button when it finishes loading



16 years ago
14 years ago


(Reporter: Dan Tobias, Assigned: Matti)


Windows 98

Firefox Tracking Flags

(Not tracked)




(2 attachments)



16 years ago
I'm not sure if this is a Mozilla bug or an evangelism bug... it will take some
disentangling of the big mess of HTML, JavaScript, and other stuff on this page
to figure out just what is triggering this problem and whether that is the
result of lack of standards compliance on the page author's part or a bug in

The link here is to a copy of the original page, since the actual original
rotates its ads periodically and not all of its states trigger this bug.  The
original URL is:

On my system, whenever I go to this page, as soon as it finishes loading it acts
like I pressed the back button and returns to the previous page.

I suspect it's triggered by something in the animated CocaCola ad at the left
side of the page, since when a different ad is there the bug doesn't trigger.

Comment 1

16 years ago
Browser, not engine. Reassigning to Browser-General until we can get
further information. 

Note: when I try
with Mozilla trunk binary 20020530xx on WinNT, I do not get redirected.


1. What build ID of Mozilla are you using?

2. Does the same problem occur in NN4.x or in IE6?

3. What happens if you disable cookies? Does the problem still occur?
   (Edit > Preferences > Privacy & Security > "Disable cookies")

4. You can also try spoofing: find either your Mozilla "all.js" file
   or "user.js" file. Then you can make Mozilla appear to be IE6
   by adding a line to either file, saving, and restarting Mozilla:

in all.js:
pref("general.useragent.override", "Mozilla/4.0 (compatible; MSIE 6.0; Windows 
NT 4.0)");

in user.js:
user_pref("general.useragent.override", "Mozilla/4.0 (compatible; MSIE 6.0; 
Windows NT 4.0)");

Does the problem still occur? (Don't bother trying this if the
                               answer to 2. above is "Yes" for IE)

5. If you feel comfortable with Tools > Web Development > JavaScript Debugger,
   set a breakpoint in the doPath() function and step through the entire
   page load process via the F11 button. Then you might see the exact line
   that causes the page redirect. 

   Note: once you bring up the JS Debugger, you have to reload the site
   in Mozilla to make all the page's files load in the Debugger. Once
   you do that, double-click the "content.jhtml.html" file in the mid-left
   pane to see its functions. Then double-click on the doPath() function
   to see it presented in the upper-right pane. There, you can click on
   the little dot icons in the left margin to set a breakpoint.

   Then load the page again in Mozilla, and execution should stop at 
   that breakpoint, allowing you to step through the code via F11.

Note: the only reason I selected doPath() for the first breakpoint
is that it seems to be the first function that is called. If you 
can find earlier code that executes, set the first breakpoint there -
Assignee: rogerl → Matti
Component: JavaScript Engine → Browser-General
QA Contact: pschwartau → imajes-qa
WFM: Win2k/2002060108. Please always include your BuildID in bug reports.
Component: Browser-General → JavaScript Engine
QA Contact: imajes-qa → pschwartau

Comment 3

16 years ago
The build is 2002052809.

In MSIE, it loads OK without triggering a back function, but shows on the status
bar that there is an error on the page.

In NS4, it not only doesn't trigger the back function, it actually shows a
totally different ad in the left side of the page.  (This is using my copy of
the page, in the URL line of this bug, not the original, which
changes its ad frequently so can't be counted on to have the one that triggers
the bug.)

Mozilla still exhibits the back-button bug with cookies turned off.

Comment 4

16 years ago
Dan: are you able to try the spoofing technique in Comment #1? 
That would help to pin this down; thanks. 

You only have to modify one or the other of those two files;
"all.js" or "user.js", with a slightly different line depending
on which one you modify -
Component: JavaScript Engine → Browser-General
QA Contact: pschwartau → imajes-qa

Comment 5

16 years ago
I should point out: the line-breaks in the spoofing lines above 
were caused by the Bugzilla textarea not being wide enough.
When you add this to the file, it should all be on one line -

Comment 6

16 years ago
Created attachment 86755 [details]
Spoofing line (with no line-breaks!)

Comment 7

16 years ago
OK, to update on this:

I tried the browser spoofing (an evil thing to do, in my opinion... browsers
should honestly identify themselves instead of pandering to clueless
browser-sniffing webmasters!), and it had no effect on the back-button effect.

I also tried creating a new profile, the usual recommendation in the face of
weird behavior that others say "works-for-me" (and something I've had to do
several times to undo the cumulative effects of having lots of different builds
muck with the profile settings), and it had no change in this case.

Then I tried it on a different machine, at work, on which I had installed a more
recent build (20020606, I think).  There, I got a message that something on the
page required a plug-in I didn't have, something to do with Active-X controls, I
think (I don't have that machine in front of me now so I can't give the exact
message).  It showed a puzzle-piece icon where the Coca-Cola video in the left
side ad should be, and it didn't do a back-button effect.

Next, I'll try updating my build over here and see what happens.

Comment 8

16 years ago
More updates: After updating my build to 2002060904, I got the same dialog about
not having the right plugin.  I'll attach a screenshot.

I attempted to follow the instructions to get the plugin, but wasn't successful.
 First, pressing the "Get Plugin" button did nothing at all.  Then I tried
changing my configurations (which disabled popups, new windows, and other stuff
that might be required by the plugin-fetching routine), but just got a new
window opening with a completely empty page.

Comment 9

16 years ago
Created attachment 87015 [details]
Screen shot of dialog saying I lack the right plugin

Comment 10

16 years ago
Dan, your comment #7 should be filed in a separate bug if you think it ought to
be investigated by mozilla developers; there should only be one problem per bug.
 Because ther original test page is no longer available on your site, I'm
marking this bug WORKSFORME.  If you continue to see the "going back" problem,
please re-open this bug, and provide either a new URL or a "web page, complete"
attachment of the page that displays the problem.
Last Resolved: 16 years ago
Resolution: --- → WORKSFORME

Comment 11

16 years ago
OK... the URL should work now.  I just tried it, and still got the mysterious
back-button effect.
Resolution: WORKSFORME → ---

Comment 12

16 years ago
I'm currently using build 2002081419, for your information.  This problem seems
to have persisted through quite a few builds.  I still don't know if it's an
actual Mozilla bug; it might be something goofy they're doing in the embedded
multimedia advertising stuff.

Comment 13

16 years ago
This URL WFM using mozilla1.1 on Windows2k.

Comment 14

16 years ago
No back button behaviour for me, 20021126.

Dan, can you reproduce with a new build?
WORKSFORME Build ID: 2002113004 XP Home

If you still experience this problem using a recent build, please
reopen this bug.

IMHO, if this bug still is experienced in a recent build, this may be 
an evangelism bug.
Last Resolved: 16 years ago16 years ago
Resolution: --- → WORKSFORME
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.