I'm having some memory problems with a (ionic) web application.
My page is reloading every x seconds (using setInterval but I also tried to use setTimeout) by performing some api calls and rebuilding itself. The amount of data in the page is quite huge, I have a lot of components, and after several reloads (it may takes some hours) I'm facing a Out of memory error.
I've already read some questions like JQuery refreshing page leads to browser out of memory and I will try to make some tests after refactoring code.
However, I would like to know if there could be a fix by "emptying" browser memory at some point.
I don't really know how memory is handled by browser (I tried to read something from Do browsers parse javascript on every page load? but it didn't help me a lot) but I know that with javascript it's not possible to close the browser tab (not opened with js, even trying to trick the browser to let it think the page was opened using js with modern browsers) and open a new one (which I think would clear the memory used, but I may be wrong).
I would like to know if [hard]reloading the page at some point would prevent the out of memory error (as a temporary fix) or if there is anything else i could do using javascript to "clear the memory" in a simple way without changing my code).