根据这篇博文,Google Drive 应该能够提供 html:http: //googleappsdeveloper.blogspot.nl/2012/11/announcing-google-drive-site-publishing.html
但在我的帐户上,我只是在<pre></pre>
.
我使用测试 html 文件创建了一个测试文件夹:https ://googledrive.com/host/0BxVNvXP_dI5QTEstTEtmMXNkOFU/
html文件的内容:
<html>
<head>
<title>Test 123</title>
</head>
<body>
Test 123.
</body>
</html>
博文中的示例具有以下 HTTP 响应标头:
HTTP/1.1 200 OK
status: 200 OK
version: HTTP/1.1
cache-control: private, max-age=315360000
content-length: 1724
content-type: text/html
date: Thu, 29 Nov 2012 12:55:22 GMT
last-modified: Tue, 06 Nov 2012 23:57:41 GMT
server: HTTP Upload Server Built on Nov 21 2012 16:10:52 (1353543052)
我的页面具有以下 HTTP 响应标头:
HTTP/1.1 200 OK
status: 200 OK
version: HTTP/1.1
cache-control: private, max-age=315360000
content-length: 96
content-type: text/plain
date: Thu, 29 Nov 2012 12:51:00 GMT
last-modified: Thu, 29 Nov 2012 12:50:28 GMT
server: HTTP Upload Server Built on Nov 21 2012 16:10:52 (1353543052)
因此,不同之处在于content-type
标题。不知何故,我需要告诉 Google Drive 我的 html 确实是一个 html。文件。