htaccess – Understanding mod_expires apache module

Working with htaccess is a new capitol for me. I have already read about mod_expires here, but I’m stil confused.

I have the next code from stack overflow:

ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access plus 2 months"

My questions are:

  1. I suppose the line ExpiresByType image/jpg "access 1 year" tells the client (browser) to download the file and keep it for one year. And when the client accesses the same page from my website, the jpg image won’t be downloaded from my website. It will be read from his computer (where the browser saved first time). After one year, the browser automatically deletes the file and, once the client access my website, it will download again, for another year. If the client cleans his browser history after 2 months, then the browser will download it again even if a year hasn’t passed. Do I miss something ?

  2. What cache availability should I set for each file type ? It depends on the file ? What should I consider when set the expiration time ?

  3. What’s the difference between "access 1 year" and "access plus 1 year" ?

  4. Does ExpiresDefault rule works for php files too ? I mean, if I have a contact.php file with some content and I modify the content of contact.php, because of ExpiresDefault rule, the content won’t change to the user ?

  5. Do search engine spiders listen for this cache rules or they download the files each time they crawling my website ?

  6. Is it true that ExpiresDefault is for the files I don’t set using ExpiresByType ? If the answer is yes, what are the other types ? What types of files are included here ?

  7. Do I understand correct that Header set Cache-Control "max-age=290304000, public" is the maximum time allowed for a file to be cached ? If the answer is yes, then means that "access 999 years" will take no effect as long 290304000 is the limit. True or false ?