Http 常见 Content-Type 有哪些
content-type是有用的,如果conten-type写错了,可能在浏览器中就不会有很好的展示,比如你把一个mp3的文件当做了mp4来展示,直接通过浏览器来访问就无法正常播放。
其他重要的响应头
Content-Disposition : attachment; filename=\"1.txt\"
//浏览器下载
Content-Disposition : inline; filename=\"1.txt\"
//直接在浏览器中打开
Location : https://www.baidu.com/
//可以让浏览器重定向到 location 指定的url上。可能有的http服务器有方便的接口设置该响应头
[html]常见的content-type类型
于 2024-11-02 22:04:19 首次发布