title: JSF Cache Static Resources Filter
body: <p>How do I write a filter which will appropriately cache static resources as recommended by Google (<a href="https://developers.google.com/speed/docs/best-practices/caching" rel="noreferrer">https://developers.google.com/speed/docs/best-practices/caching</a>).</p>
  
  <p>Is it sufficient to create a filter which sets the last-modified date to some static date (this will change every time the server restarts)? </p>
  
  <blockquote>
    <p>It is important to specify one of Expires or Cache-Control max-age,
    and one of Last-Modified or ETag, for all cacheable resources. It is
    redundant to specify both Expires and Cache-Control: max-age, or to
    specify both Last-Modified and ETag.</p>
  </blockquote>
  
  <p>The link above seems to suggest you need to specify Expires or Cache-Control. Why is that necessary?</p>