Open Bug 1070713 Opened 5 years ago Updated 6 months ago
HTTP refresh header + accessibility
.blockautorefresh causes refresh notification to disappear immediately
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"
Status: UNCONFIRMED → NEW
Ever confirmed: true
You need to log in before you can comment on or make changes to this bug.