Whenever a client requests something from the server on Discourse, it bumps the ‘last active’ time for the user. This is used for various things, including deciding whether to email a user or not. I also use it in my whos-online plugin. Logic in discourse’s AJAX requests means that background tabs do not bump this ‘last-active’ time.
On my forum we’ve seen a few instances of users ending up perpetually online, which is annoying for the whos-online display, but also means that the user won’t receive any emails.
In all cases, checking the NGINX logs reveals that the user’s browser is making repeated (every 1-2mins) requests for
/service-worker.js. The user agent string in all cases suggests this repeated request issue is limited to Firefox 56.
Does anyone have any ideas on what can be done to stop these repeated requests happening?
Should Discourse really bump the
last active time whenever the service worker is requested?