0

In 2017, for browsers updated to this point as of October 2017, is there a way to send a POST request before the browser exits? I'd like to send a POST request so that the application knows when (or if) it was abandoned midway.

If not, is there a better way to check when a user is connected and then send a POST request?

I am using Vue 2.4, if that helps.

I know there have been many answers to this but the old ones do not work as Chrome have updated their engine.

Alan Larimer
  • 589
  • 8
  • 24
test
  • 17,706
  • 64
  • 171
  • 244
  • Checking when a user connects is relatively simple if your app has any sort of authentication step. – Mike Cluck Oct 02 '17 at 16:42
  • @MikeC I suppose I can make each user connect through a NodeJS app and check their heartbeat and if no response in x seconds.. disconnect and "finish their app". But I'd rather not introduce another layer of complexity... if I do not have to. – test Oct 02 '17 at 16:44
  • Sadly, as far as i know, there is no safe method to perform any request before closing the window and using ping every x seconds is the only reliable approach. – Kamil Bęben Jun 06 '19 at 20:04

0 Answers0