;(function(){
var today = new Date().getDate()
, checkInterval = 500 // ms
;
function check() {
if((new Date).getDate() !== today) window.location.reload(true);
else setTimeout( check, checkInterval);
}
check();
})();
setTimeout(() => location.reload(), new Date().setHours(24,0,0,0) - new Date())
let now = new Date(),
midnight = new Date().setHours(24,0,0,0),
secondsToMidnight = midnight - now;
setTimeout(function() {
location.reload()
}, secondsToMidnight)