Ajouter préalablement JQUERY
<button type="button" id="startRefresh">Start</button> <button type="button" id="stopRefresh">Stop</button> <script> var timeout; function stopReload() { clearTimeout(timeout); } function startReload() { timeout = setTimeout(function() { window.location.reload(); }, 30000); // 30 seconds, e.g. } $(document).ready(function() { //START REFRESH startReload(); //Function $("#siteloader").html('<object data="myurlToPut"/>'); //BUTTON $('#startRefresh').on('click', function() { window.location.reload(); startReload(); }); $('#stoptRefresh').on('click', function() { window.location.reload(); startReload(); }); } </script>