Fixed Browser back/forward buttons retriggers alert unread status


Well-known member
Affected version
Here on, if I get a new alert and then press the browser back button, this creates a scenario where after opening the alerts menu, clicking the forward or back buttons will retrigger the unread alert badge and page title again. This spreads across any other tabs, even if one of those tabs was opened/refreshed at a later time (i.e. page content is newer).

Is this fixable or just a browser cache issue?

N.B. The video below is from Chrome, but I've experienced this with Firefox as well.

View attachment XF2 - Unread alerts go back in time with browser back button.mp4
I see that too. Pretty sure it's browser caching. If you refresh the page after going back, the new alert disappears.
It is a browser cache issue -- we allow pages to be served from cache when going back/forward as this normally provides a better experience (as it doesn't have to reload the old page). That means that we only see the old alert value, for example (and all of the old page content).

However, I will leave this open for now as there may be things we can do.
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.1).

Change log:
When navigating to a cached page, use conversation/alert unread counters from the most recent stored data, rather than what may have been included with the cached result.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
Top Bottom