Closed Bug 1742865 Opened 3 years ago Closed 3 years ago

Back button does not work any more with auto-refresh pages

Categories

(Core :: DOM: Navigation, defect, P3)

Firefox 94
defect

Tracking

()

VERIFIED FIXED
97 Branch
Tracking Status
firefox-esr91 --- disabled
firefox95 --- wontfix
firefox96 --- fixed
firefox97 --- fixed
firefox132 --- verified

People

(Reporter: firefoxbugzilla, Assigned: peterv)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [fission])

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:94.0) Gecko/20100101 Firefox/94.0

Steps to reproduce:

1/ Open a web pages (a.html) with a link to an other page (b.html) with auto-refresh.
2/ click on the link to b.html.
3/ without waiting the refresh period of the second page click on the back button
=> you return to the first page a.html .
4/click again on the link to the second page b.html with an auto-refresh
5/ wait for a few auto-refresh period
6/ click on the back button
=> you did not return to the first page a.html but stay on the second page b.html with the auto-refresh

Actual results:

Its looks like every auto-refresh of the page is handled like a link to it and pushed to the back button history. You need to click on the back button one time for every refresh.

Expected results:

auto-refresh pages should not push an entry in the back button history .

It works with safari and chrome and used to works with firefox. This seems to be a recent bug.

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Navigation' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → DOM: Navigation
Product: Firefox → Core
Blocks: backtraps
Severity: -- → S2
Flags: needinfo?(peterv)
Flags: needinfo?(bugs)
Priority: -- → P3

Hmm, for some reason nsIWebNavigation::LOAD_FLAGS_REPLACE_HISTORY isn't set in the load type.

Assignee: nobody → peterv
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(peterv)
Flags: needinfo?(bugs)
See Also: → 1743620
Blocks: fission
Pushed by pvanderbeken@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e9fc94b33da9 Handle meta refresh correctly with session history in the parent. r=smaug

Backed out for causing wpt failures on attr-meta-http-equiv-refresh/parsing.html

Backout link: https://hg.mozilla.org/integration/autoland/rev/49e1c067ecf7477a49c3efeb9b6196c44417a476

Push with failures: https://treeherder.mozilla.org/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception%2Cretry%2Cusercancel&revision=7b01edc5a0e037508da8ccd2f37df4e5091f3b3a&selectedTaskRun=HMef7vizSfKqEb7xwKLtHg.0

Failure log: https://treeherder.mozilla.org/logviewer?job_id=361164527&repo=autoland&lineNumber=7208

Failure line: TEST-UNEXPECTED-PASS | /html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html?101-110 | Refresh header: "-0; foo" - expected FAIL // TEST-UNEXPECTED-PASS | /html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html?101-110 | <meta>: "-1" - expected FAIL

Flags: needinfo?(peterv)
Regressions: 1745937
Pushed by pvanderbeken@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e55eb174b342 Handle meta refresh correctly with session history in the parent. r=smaug
Pushed by pvanderbeken@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9896c12c4907 Handle meta refresh correctly with session history in the parent. r=smaug
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch

Peter, should your fix be uplifted to Beta 96? Do you know of any real world websites that are affected by this bug? There still three weeks remaining in the Beta 96 cycle.

Many web applications that I work wigh at my daily job use auto refresh and this how I found this issue and reported the bug 1743620 which is a duplicate of this bug. It's really very, very inconvenient when you constantly work with auto refreshing pages.

I'm not sure how I should interpret "real world websites", as the sites where this is most annoying are not published. But our network monitoring system (Xymon) and our network management system (UniFi controller) suffers from this problem. It is indeed very inconvenient.

(In reply to Chris Peterson [:cpeterson] from comment #12)

Peter, should your fix be uplifted to Beta 96? Do you know of any real world websites that are affected by this bug? There still three weeks remaining in the Beta 96 cycle.

Peter is away for 3 weeks. Per comment 13 and comment 14, this looks something worth getting uplifted. Olli, would you be able to take care of uplifting in lieu of Peter? thank you.

Flags: needinfo?(bugs)

Comment on attachment 9253686 [details]
Bug 1742865 - Handle meta refresh correctly with session history in the parent. r?smaug!

Beta/Release Uplift Approval Request

  • User impact if declined: Auto-refreshing pages fill up the history menu.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The fix applies a check for meta-refresh pages, and then reuses existing code for that specific case.
  • String changes made/needed: None
Flags: needinfo?(peterv)
Attachment #9253686 - Flags: approval-mozilla-beta?
Flags: needinfo?(bugs)

Comment on attachment 9253686 [details]
Bug 1742865 - Handle meta refresh correctly with session history in the parent. r?smaug!

Approved for 96.0b8

Attachment #9253686 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
See Also: 1743620

This issue was fixed on the Latest Nightly build 132.0a1, verified on multiple platforms: Windows 10, macOS 12 and Ubuntu 22.04 followed the steps from description, back button works on auto refresh pages from attachment.

Status: RESOLVED → VERIFIED

Verified as fixed on Android as well, on the latest Nightly 132.0a1 from 05.09.2024 using Samsung Galaxy S23 Ultra (Android 14).

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: