Some Code Comments

This website's “sidebar” (it's main menu, effectively) will refresh every five minutes, because of this code it contains:

<script type="text/javascript">
(function() {
   window.onload = function() {
     setTimeout(function() {
        location.reload();
    }, 300000);
   };
})();
</script>

…which triggers a refresh every three hundred thousand milliseconds (which is therefore every three hundred seconds… or every five minutes).

The purpose of this auto-refresh is to ensure the 'currently playing…' icon more-or-less accurately reflects the music I'm actually listening to, rather than a recording I was listening to several hours ago. A manual selection of any of the sidebar menu items will also trigger a refresh and thereby 'reset the clock' for the auto-refresh functionality.

  • blog/some_code_comments.txt
  • Last modified: 2025/10/04 21:03
  • by hjr