Trott
Trott

Reputation: 70075

"ExpiresDefault access" vs. "ExpiresDefault access plus zero seconds"

In an Apache config file or a .htaccess file, is there any difference between ExpiresDefault "access" and ExpiresDefault "access plus zero seconds"?

Are they the exactly the same?

Is the second one even valid?

Upvotes: 3

Views: 5599

Answers (1)

Rich Bradshaw
Rich Bradshaw

Reputation: 72965

The second one should say 0 instead of zero.

From the manual:

The ExpiresDefault and ExpiresByType directives can also be defined in a more readable syntax of the form:

ExpiresDefault "<base> [plus] {<num> <type>}*"
ExpiresByType type/encoding "<base> [plus] {<num> <type>}*"

where <base> is one of:

access
now (equivalent to 'access')
modification

The 'plus' keyword is optional. <num> should be an integer value [acceptable to atoi()], and <type> is one of:

years
months
weeks
days
hours
minutes
seconds

ExpiresDefault "access plus zero seconds" has probably been used where the author at one point had a time addition there and forgot that 0 isn't the same as zero!

Upvotes: 2

Related Questions