Re:MomBoard: E-ink display for a parent with amnesia
by trashcan on Friday November 15, 2024 @03:03PM
(#42150350)
Yep, exactly r:refreshing failing. If you are using a full featured browser you can also use a browser extension that forces the refresh.
Additionally for a raspberry pi, you can use a watchdog timer service that checks to see if the rpi has frozen, and reboots it.
1. AJAX request for itself, with a timed retry in the case of any failure (optional: During this time, add a visible indicator that you're having connectivity issue) 2. Extract the contents of the <body> tag of the fetched HTML 3. Set the innerHTML of the <body> tag of the DOM to the fetched body.
To avoid memory leaks I'd still be tempted to also try to implement a "safe-ish refresh" that checks for a successful response and quickly fires off a location.reload() on like a daily basis.