Optimizing Document Interactivity with JavaScript: A Guide to Leveraging document.onreadystatechange for Enhanced Web Performance