Open
Bug 1095073
Opened 10 years ago
Updated 6 months ago
Web Notifications API persisting notifications in local notificationstore.json
Categories
(Core :: DOM: Notifications, defect, P5)
Tracking
()
UNCONFIRMED
People
(Reporter: adam, Assigned: saschanaz)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36
Steps to reproduce:
If a website does not account for and `.close()` every notification created on that site, the data of that notification persists in the local notificationstore.json file.
To reproduce, create several notifications on a site that's been given permission to display notifications:
notif1 = new Notification("title", {body: "body 1", tag: "example_tag"})
notif2 = new Notification("title", {body: "body 2", tag: "example_tag"})
Actual results:
With the previous example, two entries are created in notificationstore.json. If the website does not explicitly `.close()` each notification, they remain there for at least several weeks (I can't tell if they'll eventually timeout and be cleared or not), and continue to remain even after several hundred more notifications are created using the same tag attribute.
Visually, it behaves as expected and only the latest notification is shown.
Expected results:
If the same tag attribute is used, it should replace the previous notification (not just visually, but in this storage file as well). See the W3C entry for Web Notification tags: http://www.w3.org/TR/notifications/#tags-example
I can't say what the expected behavior is for notifications that do have unique tag attributes, but the current implementation doesn't seem ideal. It appears that the notifications will pile up indefinitely (is there some way that I'm not aware of for a user to view these old notifications in order to clear them?).
Site developers should account for every notification and `.close()` them, but if they don't, it could result in a large notificationstore.json file that contains logs of old chat messages for apps that use this api for chat notifications, for example.
Updated•10 years ago
|
Component: Untriaged → DOM
Product: Firefox → Core
Comment 1•6 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Updated•2 years ago
|
Severity: normal → S3
Assignee | ||
Comment 2•9 months ago
|
||
We should delete every entry that is not in the system notification center, which can happen when a user closes notification while Firefox is not running.
OS: macOS → All
Hardware: x86 → All
Assignee | ||
Updated•9 months ago
|
Assignee: nobody → krosylight
Assignee | ||
Updated•7 months ago
|
Component: DOM: Push Subscriptions → DOM: Notifications
Assignee | ||
Comment 3•6 months ago
|
||
Updated•6 months ago
|
Attachment #9400738 -
Attachment description: WIP: Bug 1095073 → WIP: Bug 1095073 - Part 1: Add nsIAlertsService.GetHistory
You need to log in
before you can comment on or make changes to this bug.
Description
•