First we need to include the jQuery library file to the HTML page to perform this task.
We just need to call these functions to perform the task. jQuery functions reduces the lines of code and makes our task easy.
Now after including the file, we need to define a variable which will store that for how long you want the timer on the page(c=60) and now the time you set needs to be changed in hours , minutes and seconds using the code “ var hours = parseInt( time / 3600 ) % ;var minutes = parseInt( time / 60 ) % 60; var seconds = time % 60;”.
Now we need to put the condition if timer got finished (if (time ==0)) then redirect to the page we want.
<h1 style="color:Red">Your session time expired</h1>