Open Bug 1070713 Opened 5 years ago Updated 6 months ago

HTTP refresh header + accessibility.blockautorefresh causes refresh notification to disappear immediately

Categories

(Firefox :: Disability Access, defect)

defect
Not set

Tracking

()

People

(Reporter: xuu, Unassigned)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0
Build ID: 20140912222815

Steps to reproduce:

Check Preferences>General>"Warn me when websites try to redirect or reload the page" or set accessibility.blockautorefresh to true on about:config.
Go to a website in that sets the HTTP refresh header.



Actual results:

Website is displayed normally while the refresh header is ignored (no refreshing or redirecting is done) and no notification is visible.
Sometimes it is possible to observe a upward-moving animation of the website, just like when a notification is hiding.


Expected results:

A notification should have been visible displaying the text "Firefox prevented this page from automatically reloading." together with an "Allow"-Button to follow the refresh header.
The notification is shown correctly if an meta refresh tag instead of the HTTP refresh header is used.
It appears to be that the notification is shown by TabsProgressListener.onRefreshAttempted defined in browser/base/content/browser.js while it is hidden by TabsProgressListener.onLocationChange by a call to gBrowser.getNotificationBox(aBrowser).removeTransientNotifications. Both, the onRefreshAttempted event and the onLocationChange event are fired when accessing a page with the refresh header set.
The same goes for the case that a meta refresh tag is used instead of the refresh header.
The difference is that when the meta refresh tag is used, the onLocationChange event is fired before the onRefreshAttempted is fired.
When a refresh header is used, the onRefreshAttempted event is fired much sooner which results in the onLocationChange event to be fired after it and so it immediately removes the notification again.
> Check Preferences>General>"Warn me when websites try to redirect or reload
> the page" or set accessibility.blockautorefresh to true on about:config.
Correction: I meant Preferences>Advanced>General>"Warn me when websites try to redirect or reload the page"
Component: Untriaged → Disability Access
OS: Linux → All
Hardware: x86_64 → All
Version: 32 Branch → Trunk
Duplicate of this bug: 1126516
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: qe-verify-
Flags: in-testsuite?
Flags: firefox-backlog+

It looks like this issue was fixed in Firefox 46 but the issue now happens randomly with recent Firefox versions. I tested with Firefox 66 (Linux 64-bit) with accessibility.blockautorefresh enabled in about:config, sometimes the HTTP Refresh header redirect works but when I restart the browser, it does not work anymore. Do you have an idea why it fails now?

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