Perhaps You can do timeout Or check JavaScript inbuilt objects While maintaining the session Hope that helps
On Fri, 2 Dec 2022 at 10:06 AM, abhishek agarwal <abhishek.gr...@gmail.com> wrote: > I want to call logout api when user close the browser or tab so the user > login session clear from the backend i try to use onbeforeunload but this > function also calls on reload i only want to call api when user close > browser. > > -- > You received this message because you are subscribed to the Google Groups > "Angular and AngularJS discussion" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to angular+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/angular/407eada2-7e6c-40a2-8162-0730bbc7bfb7n%40googlegroups.com > <https://groups.google.com/d/msgid/angular/407eada2-7e6c-40a2-8162-0730bbc7bfb7n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Sent from Gmail Mobile -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/angular/CAMF%2BC3qtUOGBDbS2Ooqwhb6PmVTLv8UtoSLFL7RdiFWyGc8Xkg%40mail.gmail.com.