Ideally, these elements should be kept as long as possible so that the browser does not request them again from the server. This saves HTTP requests, bandwidth and CPU power server-side.
Here is a configuration example for
Cache-Control headers for the Apache web server:
<IfModule mod_headers.c> <FilesMatch "\.(ico|jpe?g|png|gif|swf|css|gz)$"> Header set Cache-Control "max-age=2592000, public" </FilesMatch> <FilesMatch "\.(html|htm)$"> Header set Cache-Control "max-age=7200, public" </FilesMatch> </IfModule>