问题
I am trying to make my site working on IE 9. But from the beginning itself, it shows many errors.
HTML1114: Codepage iso-8859-1 from (HTTP header) overrides conflicting codepage utf-8 from (META tag) index.html
This is the error when I load in IE 9, but it's working fine in Firefox and Chrome. I am using HTML 5, so my header looks like below -
<meta http-equiv='cache-control' content='0' >
<meta http-equiv='ETag' content='o2389r-98ur0-w3894tu-q894' />
<meta http-equiv='pragma' content='no-cache' />
<meta name="expires" content="never">
Due to these errors, I am stuck. And no jQuery or javascript works. Can't even log in. Please help me. And also, suggest me a debugger for tracking javascript.
回答1:
This error shows up because you specified encoding inboth Content-Type HTTP Header and <meta>
tag, and they specifies different codepage.
It's not an error, it's just a warning and I think it would not break your webpage. Mozilla just doesn't report such warnings but has the same behavior as IE9.
Try to modify your Content-Type HTTP Header to give a UTF-8 encoding would probably solve this problem.
回答2:
I believe your server might be overriding your meta tags. This post might be helpful:
http://social.msdn.microsoft.com/forums/is/web/thread/2b7be95a-a90b-425f-b799-1b68a6d94f77
For javascript debugging if it's not a complex thing I use the command console.log...
来源:https://stackoverflow.com/questions/14640175/ie-issues-with-html5-headers-char-utf-8-encode-is-shown-as-error