静态对象可以针对 HTTPS 进行完全缓存吗? (加密)
如果我有一个静态对象(文件),客户端通过 HTTPS 请求该对象 - 是否可以在加密后缓存该文件? (为了根据请求节省每个客户端的加密处理时间)
注意:我不是问如何做到这一点,而是问是否可能。
If I have a static object (file), which being requested by clients via HTTPS - is it possible to cache the file after encryption took place? (for the purpose of saving the processing time of encrypting for each and every client upon request)
Note: I'm not asking how to do it, but rather if it's even possible.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不会。对于每个连接,SSL/TLS 生成的加密密钥都不同。密钥派生的一个组成部分是客户端生成的随机数,因此服务器无法预先计算密钥。
No. The encryption keys generated by SSL/TLS will be different for each connection. One component of the key-derivation is a client-generated nonce, so the server has no way of pre-calculating the key.
通过发送 Cache-Control:public,许多浏览器将缓存内容,即使它是通过 SSL 发送的。
IE 和 FF3+ 应该尊重这一点。
编辑:抱歉误读了问题。
您还可以使用某种代理服务器加密后存储内容。
By sending Cache-Control: public many browsers will cache content even if it is sent over SSL.
IE, and FF3+ should respect this.
EDIT: Sorry misread the question.
You can also store content after encryption using some sort of proxy server.