Notifications not marked as read upon returning with the browser back button #1303

Open
opened 2025-11-02 03:56:07 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @svarlamov on GitHub (Dec 1, 2017).

  • Gitea version (or commit ref): 033ad9a

Description

When I click on a notification from /notifications from the "Unread" tab to go to an issue. When I use the browser back button to go to the notifications list "Unread" tab, the notification is still showing there as unread. When I subsequently refresh the /notifications page, it has been moved to the "Read" tab. This seems to be caused by improper browser caching of the /notifications page when you use the browser back button. I'm using Google Chrome Version 62.0.3202.94 (Official Build) (64-bit).

Originally created by @svarlamov on GitHub (Dec 1, 2017). - Gitea version (or commit ref): 033ad9a ## Description When I click on a notification from /notifications from the "Unread" tab to go to an issue. When I use the browser back button to go to the notifications list "Unread" tab, the notification is still showing there as unread. When I subsequently refresh the /notifications page, it has been moved to the "Read" tab. This seems to be caused by improper browser caching of the /notifications page when you use the browser back button. I'm using Google Chrome Version 62.0.3202.94 (Official Build) (64-bit).
GiteaMirror added the topic/uiissue/confirmedtype/enhancement labels 2025-11-02 03:56:07 -06:00
Author
Owner

@andreynering commented on GitHub (Dec 3, 2017):

A HTTP header to disable cache would do the trick.

https://stackoverflow.com/a/2068407

@andreynering commented on GitHub (Dec 3, 2017): A HTTP header to disable cache would do the trick. https://stackoverflow.com/a/2068407
Author
Owner

@svarlamov commented on GitHub (Dec 7, 2017):

@andreynering I'm not too familiar with the best practices here, but I think that this makes sense for pages that load high-churn data, ie., issue pages, PRs, etc.

@svarlamov commented on GitHub (Dec 7, 2017): @andreynering I'm not _too_ familiar with the best practices here, but I think that this makes sense for pages that load high-churn data, ie., issue pages, PRs, etc.
Author
Owner

@raucao commented on GitHub (Jan 27, 2019):

By the way, the icon should disappear from the same issue as soon as there aren't any notifications left. The issue is not with the back button, but that the notifications should be marked as read and no red icon should appear before rendering the issue page for the last issue that was notified about.

Ideally, there would be sth like server-sent events (SSE) to also update the icon on previously opened issue pages, for when you open a bunch of issues in tabs. But that's more of a new feature than fixing this bug I guess.

@raucao commented on GitHub (Jan 27, 2019): By the way, the icon should disappear from the same issue as soon as there aren't any notifications left. The issue is not with the back button, but that the notifications should be marked as read and no red icon should appear *before* rendering the issue page for the last issue that was notified about. Ideally, there would be sth like [server-sent events (SSE)](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events) to also update the icon on previously opened issue pages, for when you open a bunch of issues in tabs. But that's more of a new feature than fixing this bug I guess.
Author
Owner

@stale[bot] commented on GitHub (Mar 28, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Mar 28, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1303