How to refresh the browser?

How do I instruct the browser to refresh the Main UI:

  • After a set period of interval, e.g. every 6 hour
  • At a set time e.g. midnight
  • Instructed by an openhab rule

Sometimes when designs have changed, the Mainui clients need to refresh the page. At the moment I am doing this manually on the clients.

Also when openhab has been restarted, the mainui interface seems to lose its connection to openhab, stop updating, and require a refresh.

Have a look at Userscript manager - Wikipedia
Userscript manager like Greasemonkey, Tampermonkey can be used to inject user defined javascripts in the browser during runtime. This allows to modify a webpage during runtime e.g. you can ‘add’ content to a webpage, ‘delete’ content from a webpage or change the layout of a webpage by using user defined javascripts.