differenciate refresh and browser close event in angularjs
12 views
Skip to first unread message
Viswanath Nath
unread,
Feb 11, 2020, 1:56:02 PM2/11/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Angular and AngularJS discussion
when we do refresh or browser close $window.onbeforunload is getting called but not able differentiate between the both. (Trying to crack it from 2 weeks but not able to do it)
Sander Elias
unread,
Feb 13, 2020, 2:29:13 PM2/13/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Angular and AngularJS discussion
Hi Viswanath,
It is one and the same event, so there is no way to differentiate. As a refresh in a browser is actually the same as closing and opening the same site.