-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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
Place 'charset' meta element at the top of <head> #26534
Comments
Any update on this? |
Same issue here, any updates? |
The argument for to move it to the top of Error notice: Or another option is to remove it completely and let developer decide where it will be placed inside of |
Hi, this has been updated in |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What version of Next.js are you using?
11.0.1
What version of Node.js are you using?
16.3.0
What browser are you using?
Edge, Firefox
What operating system are you using?
macOs Big Sur
How are you deploying your application?
still on local environment
Describe the Bug
I would like to re-address this issue #3210, since it has been locked as resolved.
When adding a web font to a custom
_document.js
, the web font (e.g.<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet" />
) is placed at the top of<head>
before<meta charset="utf-8">
.Also, it seems that manually adding
<meta charset="utf-8">
before the web font would result in duplication (which has been addressed in #9794, and is also an open issue #17085).Expected Behavior
<meta charset="utf-8">
should be the first thing in<head>
(referring to this hint).To Reproduce
By adding a web font to custom
_document.js
, as provided on the Font Optimization documentation.The text was updated successfully, but these errors were encountered: