I set the 'character set' as soon as possible in my web pages.
I had a comment before the line:
<meta charset="UTF-8">
The browser would find this line and go back to the top of the page and go through the comment again.
There are more tips at: bbingo.xyz/t