When I validate my website in w3.org, I get the following as info:
No Character encoding declared at document level No character encoding information was found within the document, either in an HTML meta element or an XML declaration. It is often recommended to declare the character encoding in the document itself, especially if there is a chance that the document will be read from or saved to disk, CD, etc. See this tutorial on character encoding for techniques and explanations.
I searched google and tried their suggestions but none worked for me.
I have already applied all suggested solutions in this question with no avail.
Here is the response header
of the webpage:
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:keep-alive, close
Content-Encoding:gzip
Content-Type:text/html; charset=utf-8
Date:Thu, 14 Jan 2016 15:25:27 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Pragma:no-cache
Server:Apache
Transfer-Encoding:chunked
Vary:Accept-Encoding
and the first lines of my HTML
file in a php
base website:
<?php header('Content-type: text/html; charset=utf-8');?><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fa" lang="fa">
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
<meta content="utf-8" http-equiv="encoding" />
<meta charset="UTF-8" />
I don't know what else I can do to fix that message.
Thank you for your suggestions.