ihorko
ihorko

Reputation: 6945

Javascript onclose event

How can I run javascript when user close the browser. I tried to use 'onunload', but it calls every time I press F5/refresh button? Thanks

Upvotes: 1

Views: 1845

Answers (1)

nickf
nickf

Reputation: 546085

As far as the Javascript on the page is concerned, there's no difference between closing the browser, navigating to another page or refreshing the same page.

Upvotes: 2

Related Questions