I want to trigger JavaScript garbage collection. Is it possible? Why would I want to, or not want to, do this?
I was reading Trevor Prime's answer and it gave me a chuckle but then I realized he was on to something.
All you need to do is run your code in an iframe and refresh the iframe page while saving useful information into localStorage. You'll have to make sure the iframe is on the same domain as main page to access its DOM.
You could do it without an iframe but user experience will no doubt suffer as the page will be visibly resetting.