lundi 9 février 2015

Can you use JavaScript to detect whether a user has closed a browser tab? closed a browser? or has left a browser?

To put you in the picture :



  • A user is on a mobile device and is looking at a browser (i.e. Safari on an iPhone)

  • They can see a password field to create a password in a modal box

  • If the user were to close the modal box and come out of the browser I would like to send them an email to prompt them to create a password.


My initial thought is there must be some sort of java-script event to be able to do this ?


So can you detect the following user actions with JavaScript where a users has : - Closed a Tab - Closed their Browser - Left their browser


Many Thanks





Aucun commentaire:

Enregistrer un commentaire