2
I’m building an interactive interface for an HTML/CSS3 totem that will work offline, with local files, no localhost, using Chrome in "Kiosk" mode and implemented this script (stitched with the help of the net) so that after a downtime, on mouse/touchscreen the interface goes back to the home page, it turns out that nothing happens, I work with HTML and CSS3, but now I started programming and I’m still beginner, so where I went wrong?
var idleTime = 60000;
$(document).ready(function() {
    //Increment the idle time counter every minute.
    var idleInterval = setInterval(timerIncrement, 60000); // 1 minute
    //Zero the idle timer on mouse movement.
    $(this).mousemove(function(e) {
        idleTime = 0;
    });
    $(this).keypress(function(e) {
        idleTime = 0;
    });
});
function timerIncrement() {
    idleTime = idleTime + 1;
    if (idleTime > 1) { // 20 minutes
        window.location.reload = "initial_page.html";
    }
}
						
Thanks, this change solved the problem, the code is 100% functional.
– dib