如果原始Web服务器将响应头中的expires值设置为相对较长时间传递的时间,会发生什么? [英] What happens if the origin web server sets the expires value in response header as a time which is passed relatively long ago?

查看:189
本文介绍了如果原始Web服务器将响应头中的expires值设置为相对较长时间传递的时间,会发生什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果原始Web服务器将响应头中的expires值设置为相对较长时间传递的时间,会发生什么。

What happens if the origin web server sets the expires value in response header as a time which is passed relatively long ago.

例如,考虑当前时间是周五,格林威治标准时间2013年1月25日,过期标题设置为 - >

For instance, consider current time is Fri, 25 Jan 2013 GMT, and the expire header is set as -->

到期日:1994年12月1日星期四16:00:00 GMT

Expires: Thu, 01 Dec 1994 16:00:00 GMT

客户如何回应以上情况?

How will the client respond for the above instance?

任何帮助将不胜感激

推荐答案

过期的标题中回复过去的日期(早于日期标头值)毫无意义,是一些严重错误配置的标志。话虽如此,客户会将此类响应视为已过期而不是缓存它。同样适用于 Expires date等于 Date 标头值(这是服务器将响应标记为的正确方式已过期)或格式无效。

Responding with a past date in the Expired header (earlier than the Date header value) makes no sense and would be a sign of some serious misconfiguration. That being said, clients would treat such response as "already expired" and not cache it. Same applies if Expires date is equal to Date header value (which is the correct way of server marking the response as "already expired") or having an invalid format.

请参阅有关详细信息,请参阅RFC 2616 部分。

这篇关于如果原始Web服务器将响应头中的expires值设置为相对较长时间传递的时间,会发生什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆