I have created a Google Chrome Extension with popup page and popup,js
I capture date from different pages, store them in localStorage and show on the popup page. So, I need to clear it every time I am on a different page, so that it should not show the previous value. I have tried various ways to clear localStorage like
by using window.onload and window.onbeforeunload. But, it is not working. Please help me by telling the way to do the same.