JavaScript: page refresh after timeout

If webpage business logic requires to refresh it after some timeout, the JavaScript function can help. If you use JSF, take a look here to see how to refresh page from Java code. Put this code in page <head>: <script type="text/javascript"> function refresh (timeoutPeriod){ refresh = setTimeout(function(){window.location.reload(true);},timeoutPeriod); } </script> and call it, for example in … Continue reading JavaScript: page refresh after timeout