unload function listening to both refresh and close

88 Views Asked by At

I am trying to catch a event i.e. window close. So i used unload, but it catches both refresh and close. So my action gets triggered for both. Is there a way to catch only close event?

0

There are 0 best solutions below