# Why is "29030400" seconds used as a common value for cache expiration?

I noticed that 29030400 is used very often in the Expires directives for static files.

Google recommends to cache this kind of files up to 1 year (1 month at least).

I did the math: 29030400 seconds = 336 days

That is about 1 year minus 1 month, so it perfectly falls in the recommended interval, but the question is why exactly 29030400? And not 31536000 seconds = 365 days for example? Just a blind copy/paste of a value that was set randomly in the old days? Or does it have another explanation?

• Blind copy/paste! Commented Nov 24, 2013 at 14:50

It might come from

``````60 * 60 * 24 * 7 * 4 * 12 = 29030400
``````

where each month consists of exactly 4 weeks.

• Great answer m8 :-) many people forget that 4 weeks isn't a month. Commented Nov 25, 2013 at 0:32
• makes sense, genious, accepted. Commented Nov 25, 2013 at 12:43

Unor is correct. It's like finding 2419200 seconds in a 4 week month then multiplying by 12 for a year 29030400.

However as you mention, that is not very accurate as many months have 31 days, 5 weeks, etc.

I provide an additional answer (even though the correct answer has been provided) simply to provide the exact seconds for a "gregorian year" which also includes those 5 week months, 28 days in February, etc. In case anyone needs that number.

There are 31556952 seconds in 1 gregorian year. If you want an exact year in your cache, this may be the number you are looking to use on your cache expirations. :)

• cache expirations don't really have to be exactly anything. You could round to 30000000 seconds and it really wouldn't make much of a difference. Commented Oct 12, 2017 at 22:49