You can detect when a user stops interacting with the page using pure Javascript. Example below is a scrupt that will reload the page when user becomes inactive for 5 seconds. It will still run even though you are in another tab.
1
2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<script>
onInactive(5, function () { window.location.reload(); }); function onInactive(seconds, cb) { $(window).bind(‘mousemove click mouseup mousedown keydown keypress keyup submit change mouseenter scroll resize dblclick’, function(){ |