参考链接:
https://mp.weixin.qq.com/s?__biz=MjM5ODYwMjI2MA==&mid=2649747766&idx=1&sn=4850153cd1664f79915d00b1791de5c0&chksm=bed3624d89a4eb5bdb228808e44941a538c635528a67bfeb8b8be36e39d2a2c22e10aa2db28b&mpshare=1&scene=1&srcid=0716mA1OP9VZdNF0Zq3hSscz&sharer_sharetime=1594887512158&sharer_shareid=7125c06b0fe98b972a022497973e5fc5&key=e7bdc15d285ac0a93882c4919aa1bed8f1e686207f3e7877441b3471d89ac61967ecf2a599a619fa59e86f83ccfe19bad1d8aec829b993e354415c1dc788cfda66af09b42b510554144b91685231d8f5&ascene=0&uin=MjY2OTI1MDMyOQ%3D%3D&devicetype=iMac+MacBookAir6%2C1+OSX+OSX+10.13.4+build(17E199)&version=11020012&lang=zh_CN&exportkey=A%2FN7Zh6M%2B4H4dmKmzcRcgyk%3D&pass_ticket=W%2BABhlERzXA5PqTmfy2KtphIUZPCtutAm8G9hQotQsGVIZOdyO%2BwRISlM4qrnv20&wx_header=0

HTTP 协议针对这个问题的解决方案,就是客户端缓存。从 HTTP/1.0 到 1.1、再到 2.0 版本的演进中,逐步形成了现在被称为“状态缓存”、“强制缓存”(或简称为“强缓存”)和“协商缓存”这三种 HTTP 缓存机制。这其中的状态缓存,是指不经过服务器,客户端直接根据缓存信息来判断目标网站的状态。以前只有 301/Moved Permanently(永久重定向)这一种;后来在RFC6797中增加了HSTS(HTTP Strict Transport Security)机制,用来避免依赖 301/302 跳转 HTTPS 时,可能产生的降级中间人劫持问题