I tested my site with Chrome and got the following recommendation:
The following resources are missing a cache expiration. Resources that do not specify an e
Following the Yahoo! Best Practices for Speeding Up Your Web Site, you should Add an Expires or a Cache-Control Header and Configure ETags.
How you actually go about configuring the server to do this depends on far more information than you have provided in the question.
One of the way to Set cache expiration is by using .htaccess file.
Below code will set expiration for it's respective file type, e.g. for CSS files expiration will be 14 days.
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault "access plus 1 month"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType image/x-ico "access plus 1 year"
ExpiresByType image/jpg "access plus 14 days"
ExpiresByType image/jpeg "access plus 14 days"
ExpiresByType image/gif "access plus 14 days"
ExpiresByType image/png "access plus 14 days"
ExpiresByType text/css "access plus 14 days"
</IfModule>
If this question pertains to caching of javascript or css that are a part of your tomcat application directory; you may like to examine the /conf/web.xml file.
Typically the mime mapping available here is
<mime-mapping>
<extension>js</extension>
<mime-type>application/javascript</mime-type>
</mime-mapping>
In apache the default directive is
ExpiresByType text/javascript "access plus <specify your timeframe>"
You may like to change the apache directive to application/javascript or change the tomcat mime mapping to text/javascript and this will set the expiration to your timeframe.