Chrome 下载 HTML 内容而不是显示它

Chrome downloads the HTML contents instead showing it

我们使用的其中一个 Web 应用程序可以在 Internet Explorer 中正常打开。但不是 Chrome.

我查看了页面内容,它有 meta 标签和 content="text/html; charset=iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>COMPASS</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<link rel="shortcut icon" href="/favicon.ico" />

<frameset rows="160,*" cols="*" framespacing="0" frameborder="NO" border="0">
  <frame src="banner/banner.htm" name="topFrame" scrolling="NO" noresize >
  <frame src="home.htm" name="mainFrame">
</frameset>
<noframes><body>

<a href="default.htm">default</a>
<a href="banner/banner.htm">banner</a>
</body></noframes>
</html>

所以我查看了 HTTP headers,它包含 content-type 作为 application/octet-stream。完整的 header 列表如下所示。

Accept-Ranges →bytes
Content-Length →613
Content-Location →http://myURL/Default.htm
Content-Type →application/octet-stream
Date →Wed, 04 May 2016 12:21:01 GMT
ETag →"1000558dca1:f35"
Last-Modified →Mon, 04 Jan 2010 15:45:54 GMT
MicrosoftOfficeWebServer →5.0_Pub
Server →Microsoft-IIS/6.0
X-Powered-By →ASP.NET

既然如此,我应该在浏览器中做什么才能在 Chrome 上查看此页面?

注意:我无权更改服务器或 托管在其上的网络应用程序。

服务器正在响应 header 中发回 Content-Type →application/octet-stream。此 MIME 类型用于发送未知的二进制文件。看起来服务器未设置为发送正确的响应 header。

如果您想修改浏览器的行为,以便可以在浏览器 window 中查看响应,您可以试试这个扩展程序:Modify Content-Type