5

By default, Firefox displays Web Notifications for about half a minute before automatically hiding them.

Is there a way to increase the amount of time that they are displayed before auto-hiding them?

Alternatively, is there a way to prevent them from auto-hiding at all?

  • 1
    After much digging around, I finally found evidence that confirms it's hardcoded to 20 seconds: dxr.mozilla.org/mozilla-release/…. Will continue looking for a way to change this though – MC10 Mar 18 '19 at 21:00
5

In Firefox, notifications are hardcoded to close after 20 seconds. To allow notifications to stay open indefinitely until the user closes them, toggle the dom.webnotifications.requireinteraction.enabled flag. Navigate to about:config in the address bar to do this.

The default value for dom.webnotifications.requireinteraction.enabled is false so it does not require user interaction to dismiss notifications. Set this to true.

Now the caveat is, the service sending the notification also has to use the requireInteraction property for this setting to have any effect.

You can test it here: https://googlechrome.github.io/samples/notifications/requireInteraction.html. One of the notifications disappears after 20 seconds and the other stays open. If the dom.webnotifications.requireinteraction.enabled flag is set to false, both will close after 20 seconds.

| improve this answer | |
  • 1
    Thanks so much! I made a small edit to your great answer. If for any reason the edit is not in line with the facts, please revert or edit. Thanks again! – RockPaperLz- Mask it or Casket Mar 18 '19 at 23:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.