Presumably ExpiresByType sets an expiry time on images - is that related to the visitors browser cache?
Yes. mod_expires allows an easy setup of expiration rules based on the type.
But the expiration time specifies only the freshness time of a certain response. This does not necessarily mean that the response is cacheable. But in general, any successful response is cacheable unless there are restrictions:
Unless specifically constrained by a cache-control (section 14.9) directive, a caching system MAY always store a successful response (see section 13.8) as a cache entry, MAY return it without validation if it is fresh, and MAY return it after successful validation.
So unless you specify the response not to be stored at all (i.e. using no-store
), the response may be stored by both public caches (shared caches) and private caches (local caches).
And what does A2592000 translate to?
The freshness time of a response can be expressed using either an absolute time value (e.g “2010-10-09”) or a relative time value (e.g. “tomorrow”). The date format A2592000
uses a latter time value as A
denotes access time and 2592000
is the number of seconds that are added. So A2592000
means “2592000 seconds from the time of access on”.
And what does the "brokenvary=1" imply? I gather it's looking for a UserAgent, but then what?
Apache has some special purpose environment variables where force-no-vary
is one of them:
This causes any Vary
fields to be removed from the response header before it is sent back to the client. Some clients don't interpret this field correctly; setting this variable can work around this problem. Setting this variable also implies force-response-1.0.
Now the Vary header field is used to specify a list of header field names the server used to select the response among multiple representations:
A server SHOULD use the Vary header field to inform a cache of what request-header fields were used to select among multiple representations of a cacheable response subject to server-driven negotiation.
So if you’re using content negotiation and a requested generic URL like /document.html
is requested and there are multiple representations of that resource (e.g. in English and German) and your server selects the German variant as Accept-Language states the value de
, the server would include a Vary field containing Accept-Language
to let the caches know that the selection was based on the value of Accept-Language.
But some user agents don’t get this right. And in that cases the Vary header field should not be sent that can be done by setting the special purpose environment variable force-no-vary
.