首页 > chrome请求utf-8编码的html,不显示样式,只显示文本

chrome请求utf-8编码的html,不显示样式,只显示文本

问题描述:
写了个很简单webserver,首次访问,返回如下的一个模板(login.html, utf-8编码)

<html xmlns="http://www.w3.org/1999/xhtml">   
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title></title>   
</head>   
<body>
<form action="/login" method="post">
  username:<input type="text" name="username" /> password:<input type="password" name=
  "password" /> <input type="submit" value="login" />
</form>   
</body> 
</html>

使用IE、FF都可以正常显示最基本的样式,可是用chrome访问的时候却原样返回了html文本。奇怪的是把html的编码格式设置成非utf-8就可以正常显示了,有基本样式了。

求解答,多谢。

【热门文章】
【热门文章】