Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery
DOCUMENTATION: Jetty 6 - this wiki. Jetty 7 - at Eclipse. Jetty8 - at Eclipse. Jetty 9 - at Eclipse.
Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current ·  View Page History

How to optimize with Last-Modified and Cache-Control?

Last Modified header

Section 14.29 of RFC2616|http://www.w3.org/Protocols/rfc2616/rfc2616.html] describes the last-modified header. If this header is sent with a response containing content, then the client is able to cache that content and check that it is up to date with a request containing a If-Modified-Since header.

If the content has not been modified, then a simple 304 response may be sent and the server can avoid resending the content.

Jetty will put a last-modified-header on all static content served and implements support for the if-modified-since header in the default servlet that serves that static content. For dynamic content generated by servlets, last-modified and if-modified-since may be supported by implementing the getLastModified(request) method on the servlet.


Back to Jetty Documentation


Labels
  • None
Contact the core Jetty developers at www.webtide.com
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery