为什么HTML页面是通过浏览器下载为文件而不是浏览?

时间:2016-10-06 19:08:32

标签: html google-chrome localhost

我将下一个HTML代码用作页面,但Chrome只是将此页面作为文件下载,而不是作为超文本浏览。

使用的地址:http://127.0.0.1:5151/

它出了什么问题?

<!DOCTYPE html>
<html lang="en" xmlns="">
<head>
    <meta charset="UTF-8">
    <title>Greeting</title>
</head>
<body>
    <h3>Greetings!</h3>
    Welcome to the Web Interface.<br/>
    <br/>
    What action are you want to do?<br/>
    <br/>

    1. <a href="/upload_config">Upload config</a><br/>

</body>
</html>

标题使用Content-Type: application/xhtml

1 个答案:

答案 0 :(得分:0)

检查文件扩展名是否为.html而不是.hmlt或其他

相关问题