web icon indicating copy to clipboard operation
web copied to clipboard

Unclear when user is present vs. in other tab vs. offline

Open jkeat opened this issue 5 years ago • 1 comments

This PR will show whether the partner's socket is connected or not: https://github.com/UPchieve/server/pull/371

But a user can have a connected socket and still be unreachable (e.g. they're in another tab). What's the best way to address this?

ideas

  • https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API
  • read receipts

jkeat avatar Jun 18 '20 01:06 jkeat

The Page Visibility API looks like a good option. It has support back pretty far in pretty much every browser, so not likely to need shims.

thedevelopnik avatar Sep 29 '20 16:09 thedevelopnik