XF 1.3 Notifications when browser window stays open but not refreshed

Mr Lucky

Well-known member
A couple of my members have complained that if they leave a bowser window open on a thread, but do not refresh the window (ie they are not seeing/reading any new replies) then they don't get notifications of new replies.

Is this expected? Is there a way round this? Obviously we could tell people not to leave browser windows open but with tabbed browsers it's very easy to leave them open,especially I noticed with Safari ipad because they are not all there on the screen.

So you have this browser window lurking there causing you not to get notifications, even though you don't see the new post replies.
 
Notifications require some sort of action to trigger them.
Such as clicking on an avater to show the member card, refreshing the page, etc.

Push notifications are not possible without an add-on, of which there are a few available.
 
Notifications require some sort of action to trigger them.

Normally one would get notifications without doing any action

Say someone posts in a thread, close the browser window and subsequently there is a reply - they should get a notification - according to their prefs:

  • Automatically watch threads that you create or when you reply...
    • and receive email notifications of replies

But if they post in a thread and leave the browser window open, then that does not happen.

So are you saying that closing the browser window is one of the actions required in order to get a notification?

Push notifications are not possible without an add-on, of which there are a few available.

I'm not sure what you mean by push notifications, but if it means people would get them without having to close the browser window, then can you say which add-on would do that please?
 
Last edited:
Sorry i should be a bit clearer.

This is a complaint from a member. The odd thing is I did a test it does work for me, ie I get a notification without doing anything while the browser window is left open

So maybe it depends on the browser. Is that possible?
 
What you describe is how it should happen. If the user hasn't read the thread after the last reply, new replies do not trigger notifications until the thread is read.
 
What you describe is how it should happen. If the user hasn't read the thread after the last reply, new replies do not trigger notifications until the thread is read.

I understand that, if you get a notification but don't read the reply, you won't get further notifications. That isn't what i mean.

No I'm talking about not even getting a notification for the first reply, if you happened to have left the browser window open. (But seems to be not all browsers, I'm still testing)

I always thought that if there is a reply to your post/thread, you should get a notification (whether or not you have left the browser window open)

But it seems in some cases, leaving the browser window open means you don't get a notification, even though you haven't
 
Just to be clear...

Let's say I reply to this thread, I am then automatically watching this thread and I then leave the thread and go to the forum home. The browser is still open.

Meanwhile, you reply.

What are you expecting to happen?
 
I would expect you to get a notification of my reply.

Sorry again though, I was not clear.

The question was in regard to leaving the browser window open on the thread (without refreshing)
 
It's exactly the same as @Brogan has already said then.

Something needs to trigger it. One additional thing that triggers it that Brogan didn't mention is the Draft Save feature of the editor. If I'm in a thread, and the editor is focused and contains text, every 60 seconds or so a draft will save. That is one of the actions that will trigger a check for new alerts and show you the "You have X alerts" pop up in the bottom left corner.

To be slightly more technical anything that triggers an AJAX request will potentially trigger the alerts to be updated. Plus there's occasions where you might go from one tab to another and I believe that anything that contains a form input that refreshes your CSRF token may also trigger the alerts to be updated. Things that trigger AJAX requests are, the drafts saving, clicking on an avatar, opening some sort of overlay, clicking Reply, clicking Like, lots of things.

There is nothing on the page that specifically checks every X seconds for new alerts. It requires *something* to trigger it.

There's an add-on called Live Update in the Resource Manager. That adds some code on every page that does trigger a check for alerts every 10 seconds. But aside from that Brogan was spot on, in the core software it always needs something to trigger it.
 
It's exactly the same as @Brogan has already said then.

Something needs to trigger it..

Yes, but isn't it the reply that should trigger the notification?

I mean if I post something, then turn my computer off. Someone replies and there should be a notification

Isn't it the reply that is triggering the notification, not the turning off of the computer?
 
The notification arrives regardless of whether your computer is on or off, whether your browser is open or closed.

The page you are on does not get updated with the information that tells you a notification has arrived until some sort of action has occurred.
 
The notification arrives regardless of whether your computer is on or off, whether your browser is open or closed.

This is exactly the issue. What you say is what i would expect, but iIt seems for this user, the notification is not arriving if the browser on the thread stays open.
 
Something needs to trigger it.

Is it always an intentional action, such as clicking on a member name, though? I've noticed sometimes that when I'm away for something, such as grocery shopping, and later return that alerts will pop up just from scrolling the current page, provided that nothing AJAX-related was done when I left.
 
There's an add-on called Live Update in the Resource Manager. That adds some code on every page that does trigger a check for alerts every 10 seconds. But aside from that Brogan was spot on, in the core software it always needs something to trigger it.

Kinda glad you mentioned this plugin, because i had forgot i installed it way back when and it just works so well i eventually just started thinking it was a basic XF feature. Speaking of which i should install that puppy on my new forum..
 
Is it always an intentional action, such as clicking on a member name, though? I've noticed sometimes that when I'm away for something, such as grocery shopping, and later return that alerts will pop up just from scrolling the current page, provided that nothing AJAX-related was done when I left.
I did give an example or two where it may not be consciously triggered by yourself.

One is when it updates your CSRF tokens.

The other is if you're focused in the editor and a draft auto saves.
 
Cross-site request forgery. You have a token that is periodically updated and is checked whenever you send data to the server that circumvents CSRF exploits.
 
Back
Top Bottom