Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta charset not defined #16289

Open
3 tasks done
AdrianoLMRS opened this issue Dec 17, 2024 · 2 comments
Open
3 tasks done

Meta charset not defined #16289

AdrianoLMRS opened this issue Dec 17, 2024 · 2 comments
Assignees

Comments

@AdrianoLMRS
Copy link

AdrianoLMRS commented Dec 17, 2024

FAQ

URL

https://pousada-tao.onrender.com/

What happened?

Properly defines charset - Error!


Error description

A character encoding declaration is required. It can be done with a tag in the first 1024 bytes of the HTML or in the Content-Type HTTP response header. Learn more about declaring the character encoding.

My charset is correctly defined in my HTML head (it is the first meta tag), but this annoying error keeps happening...

Full HTML tag
<!DOCTYPE html>
<html lang="pt-BR">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Pousada TAO Campos do Jordão</title>
    <link rel="icon" type="image/x-icon" href="https://res.cloudinary.com/dycnoic1s/image/upload/v1734371342/elemento_flor.fw_2_wr5wtf-fpng_1_whto4n.png">
<!-- ...css styles -->
</head>
<!-- ...</body> tag -->


There are these related issues that I already looked:

What did you expect?

Not getting this error ):

What have you tried?

  1. Using a node middleware to set content type to always = content-type: text/html; charset=UTF-8

  2. Using curl with WSL to verify the charset curl -I https://pousada-tao.onrender.com/
    Output = HTTP/2 200 date: Tue, 17 Dec 2024 22:49:32 GMT content-type: text/html; charset=UTF-8

  3. Trying in several browsers :

  • Chrome v131.0.6778.140
  • Firefox v134.0b10
  • Brave
  1. Setting up the html with github pages (Same error occurs)

How were you running Lighthouse?

PageSpeed Insights, Chrome DevTools, Other

Lighthouse Version

v100.0.0.3 (extension)

Chrome Version

v131.0.6778.140

Node Version

v18.19.1

OS

Windows (WSL)

Relevant log output

curl -I https://pousada-tao.onrender.com/
# Output :
HTTP/2 200
date: Tue, 17 Dec 2024 22:49:32 GMT
content-type: text/html; charset=UTF-8
cf-ray: 8f3a7787bed79ca6-GIG
cf-cache-status: DYNAMIC
cache-control: public, max-age=0
etag: W/"a968-193d6cb1e00"
last-modified: Tue, 17 Dec 2024 22:44:16 GMT
vary: Origin, Accept-Encoding
access-control-allow-credentials: true
rndr-id: cbeb2cb7-913c-458a
x-powered-by: Express
x-render-origin-server: Render
server: cloudflare
alt-svc: h3=":443"; ma=86400
@AdrianoLMRS
Copy link
Author

I also have tried these websites :

And I didn't get the same error ...

@adamraine
Copy link
Member

I can repro, this is caused by a second cancelled document request initiated during the page load. When we try and get the main document we should filter out any failed/cancelled requests.

@adamraine adamraine assigned adamraine and unassigned connorjclark Dec 19, 2024
@adamraine adamraine added the P1.5 label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants