Skip to content

Commit

Permalink
Increase fetch interval from 2s to 10s.
Browse files Browse the repository at this point in the history
Updated the JavaScript interval in the dashboard to improve performance and reduce the number of requests to the server. This change adjusts the fetch operation timing, now setting it to a 10-second interval instead of the previous 2 seconds.
  • Loading branch information
wolxXx committed Dec 3, 2024
1 parent 1a545e2 commit efdec5e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/views/action/cms/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
</h1>

<script>


document.addEventListener('DOMContentLoaded', function () {
setInterval(function () {
fetch('/', {
Expand Down Expand Up @@ -59,7 +57,7 @@
.catch(error => {
console.error('There has been a problem with your fetch operation:', error);
});
}, 2000); // 10 seconds interval
}, 10000);
});

</script>
Expand Down

0 comments on commit efdec5e

Please sign in to comment.