randomly getting this issue come up in my web console of firefox (is the js tab)
Its only just appeared and cant link it to any changes i have made.
The full error is:
The page was reloaded, because the character encoding declaration of the HTML document was not found when prescanning the first 1024 bytes of the file. The encoding declaration needs to be moved to be within the first 1024 bytes of the file.
Or this one:
The character encoding declaration of the HTML document was not found when prescanning the first 1024 bytes of the file. When viewed in a differently-configured browser, this page will reload automatically. The encoding declaration needs to be moved to be within the first 1024 bytes of the file.
The issue points to this line:
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8" />
To me, that meta tag is okay? Any help as i think it is conflicting and causing issues with other things.
Craig
Adding <meta charset="utf-8"/> in the html code solved my issue in Firefox. Save this answer.
Always declare the encoding of your document using a meta element with a charset attribute, or using the http-equiv and content attributes (called a pragma directive).
The character encoding should be specified for every HTML page, either by using the charset parameter on the Content-Type HTTP response header (e.g.: Content-Type: text/html; charset=utf-8 ) and/or using the charset meta tag in the file.
The default character encoding in HTML5 is UTF - 8.
Charset is a parameter of the content-type, not a separate attribute:
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
Or, if you want to use the HTML 5 style:
<meta charset="utf-8">
You should also note the error message:
not found when prescanning the first 1024 bytes of the file
You might need to move the meta tag up the document. Ideally, it should be the first tag inside the <head>
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With