搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Back-button stops working

  • 22 回覆
  • 33 有這個問題
  • 206 次檢視
  • 最近回覆由 hallvord

more options

Hello experts.

I have a curious problem where the back-button stops working - and other threads regarding this issue has proven unsuccessful in my case, like changing the browser.backspace_action value, resetting Firefox and disable hardware acceleration.

Alright, try this link: http://htmlticker.nmd.dk/udenadform/index.php?page=1 When clicking the number buttons, the page changes - and when clicking the back-button, it returns to the previous pages. So far, so good.

Now, try this: http://htmlticker.nmd.dk/medadform/index.php?page=1 Try clicking some numbers, for instance 1 to 5 and click back. Nothing happens, right? The page reloads, but the browser doesn't return to the previous page.

The difference between the two pages are that the upper link's sourcecode points directly to the ticker HTML, while the lower link's sourcecode points through Adform advertisement engine - but still, it should rewind as usual.

Any bright ideas are much appreciated - at least a reason, so I can inform our customer.

Hello experts. I have a curious problem where the back-button stops working - and other threads regarding this issue has proven unsuccessful in my case, like changing the browser.backspace_action value, resetting Firefox and disable hardware acceleration. Alright, try this link: http://htmlticker.nmd.dk/udenadform/index.php?page=1 When clicking the number buttons, the page changes - and when clicking the back-button, it returns to the previous pages. So far, so good. Now, try this: http://htmlticker.nmd.dk/medadform/index.php?page=1 Try clicking some numbers, for instance 1 to 5 and click back. Nothing happens, right? The page reloads, but the browser doesn't return to the previous page. The difference between the two pages are that the upper link's sourcecode points directly to the ticker HTML, while the lower link's sourcecode points through Adform advertisement engine - but still, it should rewind as usual. Any bright ideas are much appreciated - at least a reason, so I can inform our customer.

被選擇的解決方法

Hi, to understand this problem it's important to keep in mind what the Back button is supposed to do (even though it may seem obvious :-)). Back essentially means "revert the last navigation action that took place on this page". On pages that use frames/iframes, the browser must take care to ensure Back only affects the frame that was navigated most recently - or it will in most cases fail to work as the user expects.

What I believe (based on similar cases I've analysed) is happening here, is that some JavaScript on this page navigates an IFRAME in a way Firefox registers as a "reversible" navigation. A single click on the back button will thus reverse the navigation in the (possibly invisible) IFRAME and the user will believe nothing happened. Double-clicking the back button will often successfully go back when you are in this state.

If it works in other browsers, it means Firefox is using slightly different logic to register what navigations are "reversible" - and I would personally consider that a bug in Firefox, though it's entirely possible that we would break back functionality on some other site trying to fix this. -Hallvord

從原來的回覆中察看解決方案 👍 1

所有回覆 (20)

more options

Sometimes a problem with Firefox may be a result of malware installed on your computer, that you may not be aware of.

You can try these free programs to scan for malware, which work with your existing antivirus software:

Microsoft Security Essentials is a good permanent antivirus for Windows 7/Vista/XP if you don't already have one.


Further information can be found in the Troubleshoot Firefox issues caused by malware article.

Did this fix your problems? Please report back soon.

more options

Well, I'm using full licensed versions of the newest Spyhunter and AVG Internet Security and none has been found. Also, this error was reported to us by our clients, who got the information from several visitors on the websites, running the ticker, so I think the reason is located somewhere else.

But do you see the problem as well on the lower link?

more options

I have tried the above sites and both work correctly.
Please try this on Internet Explorer or another browser if possible. (Not Google Chrome)

Do not use Google Chrome because it has many built in plugins. This prevents you from diagnosing any software issues.

more options

It works perfectly in Internet Explorer. However, I just made an observation. Please see the attached screendump from Charles.

What I did was to step through the numbers from 1 to 7 and then click back, three times (marked in blue). As you can see, it doesn't reload the previous index.php-file, but still loads the jquery-file.

It works like this: The index.php-file calls the adserving service, which reads the HTML-banner (called 841x26.html and a nocache, which refreshes every minute). 841x26.html uses jquery.webticker.js

由 hertugen 於 修改

more options

This sounds like an incompatibility with Firefox, but I'm not sure.

I'll speak with the support team and report back soon.

more options

Hello hertugen,

I wasn't able to see the issue that you're reporting on a Windows 7 machine running FF24. Do you have any addons installed which might be causing these issues? Try Firefox Safe Mode to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.

(If you're not using it, switch to the Default theme.)

  • On Windows you can open Firefox 4.0+ in Safe Mode by holding the Shift key when you open the Firefox desktop or Start menu shortcut.
  • On Mac you can open Firefox 4.0+ in Safe Mode by holding the option key while starting Firefox.
  • On Linux you can open Firefox 4.0+ in Safe Mode by quitting Firefox and then going to your Terminal and running: firefox -safe-mode (you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
  • Or open the Help menu and click on the Restart with Add-ons Disabled... menu item while Firefox is running.

FirefoxSafeMode

Once you get the pop-up, just select "'Start in Safe Mode" Safe Mode Fx 15 - Win

If the issue is not present in Firefox Safe Mode, your problem is probably caused by an extension, and you need to figure out which one. Please follow the Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems article for that.

To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.

When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.

Thank you.

more options

Hello and thank you for your answer. I'm sorry, but it didn't make much of a difference. At first glance, it may appear to work - but if you go through the row of numbers a couple of times, you should encounter the same thing in this version. The problem is most apparent if the page has been cached, so please try to go through the numbers a couple of times.

http://screencast.com/t/3KqrGqnbGq9 - a screengrab of the problem

- I opened the browser, cleared the cache, restarted Firefox and opened the page. As the video shows, the problem persists.

Now, the reason why this is so important in this case is that the ticker is running at multiple places at, for instance, www.bold.dk. The users navigate around a bit and is suddenly "imprisoned" to the same page.

more options

選擇的解決方法

Hi, to understand this problem it's important to keep in mind what the Back button is supposed to do (even though it may seem obvious :-)). Back essentially means "revert the last navigation action that took place on this page". On pages that use frames/iframes, the browser must take care to ensure Back only affects the frame that was navigated most recently - or it will in most cases fail to work as the user expects.

What I believe (based on similar cases I've analysed) is happening here, is that some JavaScript on this page navigates an IFRAME in a way Firefox registers as a "reversible" navigation. A single click on the back button will thus reverse the navigation in the (possibly invisible) IFRAME and the user will believe nothing happened. Double-clicking the back button will often successfully go back when you are in this state.

If it works in other browsers, it means Firefox is using slightly different logic to register what navigations are "reversible" - and I would personally consider that a bug in Firefox, though it's entirely possible that we would break back functionality on some other site trying to fix this. -Hallvord

more options

Seems to be working here.

Which entries do you see if you right-click the Back button on the Navigation Toolbar?


Start Firefox in Safe Mode to check if one of the extensions (Firefox/Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Firefox/Tools > Add-ons > Appearance).

  • Do NOT click the Reset button on the Safe Mode start window.
more options

Hello contributors.

Now, it is working perfectly. I had a jQuery function (which sets the background color in a DIV). This code was run in the header AND in the body onLoad and this - for some reason - caused the back-logic to malfunction at some point as shown in the screen capture video.

I have deleted the call in the header and modified the PHP-part a bit - and everything works as intended.

My gratitude to everybody, specially Hallvord and our client's IT-dept, who brought me on the right track :-)

more options

Interesting. How exactly did it set background color? Did it use document.write()? I'm asking because document.write() after loading is finished will create (i.e. navigate to) a new document. This has implications for how the back button works.

more options

You can see for yourself in the javascript sourcecode: http://htmlticker.nmd.dk/841x26/webticker.php - the second background (and redundant) initialization has been removed from <head> and consisted of the line <script ="javascript">justerTema(0)</script>

It was a mistake to even have the code located there - but I found it curious that it had so much influence over the navigation buttons as demonstrated. Lesson learned.

more options

Whoa - that code just sets document.body.style.backgroundColor - there is absolutely no reason that should interfere with the back button. If that did actually happen it's a bug, and should be reported! Are you able to recreate the problem with as little code as possible?

more options

Hello everybody. Just for your information; I'll provide additional information in order to shed some lights over things - I just have to get an overview myself, since our client has provided me with three solutions where one works and two doesn't, using three different methods.

I'll try to see if there's any logic in those occurrences and get back as soon as possible, so that this thread can be closed, once and for all.

more options

Had similar problem with back button. Intermittently back page would not load. I disabled a color theme (furfox tail twister) and it resolved my problem.

由 piccirilli 於 修改

more options

Note that you can hold down the left mouse button on the Back button to open the tab history list.

more options

Yeah, but that is a hassle for quick browsing.

more options

I am having this same problem, but have narrowed the problem down to Cloudflare integration.

I use Cloudflare to speed up my site loading times. For some reason, it loads the site in "pieces" with a short pause in between each piece. This apparently causes Firefox to think that each piece is a reversible navigation.

So on my site, TillHeComes.org to actually go "Back" from any post or page, you usually have to press the "Back" button three times before it actually goes back.

I have submitted a ticket to Cloudflare as well, but think that since my site works fine with Chrome, IE, and Safari, it might be a bug with the FF browsing logic, as stated in one of the other comments above.

more options

I think this is (or is related to) https://bugzilla.mozilla.org/show_bug.cgi?id=148794 - but it's a very old bug, and as you can see from the history and comments a solution was attempted and then backed out. Frankly, how the back button should work isn't always well understood or specified. I've written a test case - code here: https://gist.github.com/hallvors/7928615 - which shows that IE does the same thing as Firefox, while Chrome and Opera (Presto) agree on not saving history entries for document.write(). I'm pretty sure Opera changed this a couple of years ago.

BTW, have you changed your page to avoid this problem? I could no longer reproduce - which is a bit of a pity, because I wanted to check if it's also a problem in Internet Explorer. Per my test case it should be ;-)

more options

(And since you said it isn't a problem in IE, I'd like to look into how Cloudflare avoids running into this same issue - it seems likely that they work around it for IE but haven't done the same workaround for Firefox..)

  1. 1
  2. 2