[Next] [Up] [Previous]
Next: Warnings Up: Caching Previous: Pragma HTTP Headers

Expires HTTP header

The Expires HTTP header is the basic means of controlling caches; it tells all caches how long the object is fresh for; after that time, caches will always check back with the origin server to see if a document is changed. Expires headers are supported by practically every client. Most Web servers allow someone to set Expires response headers in a number of ways. Commonly, they will allow setting an absolute time to expire, a time based on the last time that the client saw the object (last access time), or a time based on the last time the document changed on the server (last modification time). Expires headers are especially good for making static images (like navigation bars and buttons) cacheable. Because they don't change much, an extremely long expiry time on them can be set, making a web site appear much more responsive to its users. They are also useful for controlling caching of a page that is regularly changed. For instance, if a news page is updated once a day at 6 a.m., the object it can be set to expire at that time, so caches will know when to get a fresh copy, without users having to hit the 'reload' button. As we stated in section 3, the only value in an Expires header is a HTTP date; enything else will most likely be interpreted as 'in the past', so that the object is uncacheable. Note that the time in a HTTP date is Greenwich Mean Time (GMT), not local time.
[Next] [Up] [Previous]
Next: Warnings Up: Caching Previous: Pragma HTTP Headers
Copyright © 2003, John Yannakopoulos <giannak@csd.uoc.gr>