Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"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?

like image 307
Trott Avatar asked Nov 29 '25 22:11

Trott


1 Answers

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!

like image 139
Rich Bradshaw Avatar answered Dec 01 '25 18:12

Rich Bradshaw



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!