Thank you all for contributing, I have got an answer to my question after gathering more specific information from another question I've asked in regards to mouseenter/mouseleave events (Answer: https://stackoverflow.com/a/17717275/2593839).
If the mouse cursor moves out of the window, the timer will begin and once the timer reaches the specified interval, it refreshes the page. If the mouse enters back into the window before the specified interval is reached, then the timer is reset.
For anyone wanting the final code, it's down below. You can just change the iFrame source and the refresh rate which is 5 seconds (used to test the code) to meet your needs:
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<title></title>
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<script>
function refresh() {
window.location.reload(true);
}
var timer;
function start() {
timer = setTimeout(function(){refresh()}, 5000);
}
jQuery(document).ready(function() {
start();
jQuery('body').mouseenter(function() {
clearTimeout(timer);
}).mouseleave(function(e) {
var pageX = e.pageX || e.clientX,
pageY = e.pageY || e.clientY;
if(pageX <= 0 || pageY <= 0) {
start();
}else {
clearTimeout(timer);
}
});
});
</script>
<style>
body {
margin: 0;
}
</style>
</head>
<body>
<iframe id="iFrame1" src="http://www.website.com/" style="border: 0; width: 100%; height: 100%">Your browser doesn't support iFrames.</iframe>
</body>
</html>