Avoid a Character Set in the Meta Tag warning is actually from Google Page Speed Insights for speed optimization. You can see this warning in GTMETRIX or Pingdom as well. Today we will deep dive into this issue.
What is Character Set
According to
What is a Meta Tag?
A meta tag describes about the content of the web page. It is an element of HTML. Meta tags can describe a webpage’s description, keywords, author of the document, last modified, and other metadata.
How to Avoid a Character Set in the Meta Tag?
There are several methods for defining a charset without using a meta tag. Depending on your web server. Such as:
Avoid a Character Set in the Meta Tag in Apache
For Apache Open your .htaccess then add the following line:
AddType 'text/html; charset=UTF-8' html
Avoid a Character Set in the Meta Tag in Nginx
For Nginx Open your nginx.conf then add the following line:
http {
include /etc/nginx/mime.types;
charset UTF-8;
...
}
This will solve your problem about Avoid a Character Set in the Meta Tag.
If you enjoyed this tutorial, then you’ll love our support. If you need anything relates to WordPress Speed Optimizationplease send us a message.