I need to handle browser close (through cross on the top right side) through javascript or Jquery. I have found lots of forums or blog where they give a solution to do this using onUnload or OnbeforeUnload
etc. But these event always get triggered whenever page refresh or go back and forward in browser.
I need to expire cookies only when user signout from application or user close the window. If i use the onUnload or OnbeforeUnload event they get triggered even when page refreshed or back or forward as i have already told.
Any help really appreciated. Thanks