azl397985856 / fe-interview

宇宙最强的前端面试指南 (https://lucifer.ren/fe-interview)
Apache License 2.0
2.83k stars 260 forks source link

【每日一题】- 2020-09-15 - 响应头 content-type 的奇幻之旅 #150

Closed azl397985856 closed 3 years ago

azl397985856 commented 3 years ago

浏览器拿到一个资源后, 会首先去读取 response header 的 content-type,根据不同的值,采取不同的策略。

那么,如果:

suukii commented 3 years ago

MIME Sniffing,就是浏览器会通过读取一部分响应内容来确定 MIME Type。

MIME Sniff Spec

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.