The primary issue I would imagine, would be not that a meta refresh fails to happen, rather, that any type of full refresh is attempted during a momentary 'blip' of the local network, leaving it showing a "cannot find server" type of error. To achieve the safest persistence of the refresh loop, it would probably make more sense to have the refresh function via
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.
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.