Problem -Browser Out of Memory
I am in charge of a browser (Edge) tab that runs a Grafana dashboard playlist 24/7 to track stats. After an unpredicted period of time, the tab will show the "Out of Memory" error page, while all the other tabs are working fine. After refreshing the page, everything will work perfectly again.
Current Solution
Since upgrading Grafana to fix the suspected issue "memory leak on Grafana" is currently unfeasible due to company policy.
To fix this, I have to manually refresh the page by clicking the refresh page button. Is there any way to automate this behavior or to avoid/prolong this "out of memory" issue arising?
Attempts
By inserting JS code into DevTools > snippets. I can successfully reload the page into the playlist using window.location.assign(). Yet, the JS script will stop running after the page has been reloaded and thus setInterval() to reload the page from time to time is not working, meaning I can only auto-reload it once.
I have searched the web for answers on JS code insertion, but due to company policy, extensions like Tampermonkey and such are forbidden. Is there any solution to this? Whether it is storing the JS code and running it elsewhere or perhaps reloading the page using other methods.
2
Answers
Go to chrome web store and get this extension
https://chromewebstore.google.com/detail/auto-refresh-plus-page-mo/hgeljhfekpckiiplhkigfehkdpldcggm
this is all you need , install it and set desired time interval to refresh page
alternatively just save this html file and open it in browser (replace time and url according to you) ( No Extension Needed )
The best way would be to put the reload logic in the code itself. But in lieu of that, you could open another tab and open the url you want through the console using the
window.open
function. With that you can put the opened tab in ansetInterval
to reload every 10 minutes like this:Replace the url above with your dashboard URL.