index.html 放在服务器上,浏览器输入地址链接是下载而不是打开
我把一个 html 文件放在公司的云存储上,然后在浏览器输入地址链接,我想要的是打开这个 html,但是谷歌浏览器直接把这个 html 文件下载了,并不是解析 html
为什么是下载不是打开?为什么将 html 放在服务器上就可以?有什么区别?
我把一个 html 文件放在公司的云存储上,然后在浏览器输入地址链接,我想要的是打开这个 html,但是谷歌浏览器直接把这个 html 文件下载了,并不是解析 html
为什么是下载不是打开?为什么将 html 放在服务器上就可以?有什么区别?
Access-Control-Allow-Headers: DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Allow-Origin: *
Cache-Control: max-age=0
Content-Disposition: attachment; filename=”test.html”
Content-Encoding: gzip
Content-Type: text/html
Date: Wed, 23 Sep 2020 07:18:39 GMT
ETag: W/”fef40692c82492577988854f508d411d”
Expires: Wed, 23 Sep 2020 07:18:39 GMT
Last-Modified: Wed, 23 Sep 2020 07:15:26 GMT
Server: openresty
Transfer-Encoding: chunked
Vary: Accept-Encoding
x-jss-request-id: 9338D2040B2AB5C3
The site configured at this address does not contain the requested file.
If this is your site, make sure that the filename case matches the URL.
For root URLs (like http://example.com/) you must provide an index.html file.
Read the full documentation for more information about using GitHub Pages.
GitHub Status — @githubstatus
https://www.jianshu.com/p/d4a85d025768
<!DOCTYPE html>
<html>
<head>
<meta charset=”UTF-8″>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″>
<title>Insert title here</title>
</head>
<body>
测试
</body>
</html>
—-
就是#13 说的: 云存储服务器 你的每个请求都是下载请求,不给你解析网页的机会