title: Remove localStorage on closing browser javascript
body: <p>I found most answer using <code>window.onbeforeunload</code> to handle browser closing. But it also does action when refreshing browser. I just want to remove my localStorage when browser closed not refreshing.</p>