1

In this gwt web says to place a *.htaccess config file like this to avoid caching main javascript gwt application.

<Files *.nocache.*>
  ExpiresActive on
  ExpiresDefault "now"
  Header merge Cache-Control "public, max-age=0, must-revalidate"
</Files>

<Files *.cache.*>
  ExpiresActive on
  ExpiresDefault "now plus 1 year"
</Files>

Is there a way to do the same with Jetty ? (whithout needing to use httpd jetty module)

ramon_salla
  • 1,587
  • 1
  • 17
  • 35

1 Answers1

0

This answer shows how to disable/enable caching for all files served with Jetty:

How to prevent caching of static files in embedded Jetty instance?

I think to set up custom caching settings for individual files (e.g. nocache), one must use a filter and set the headers manually in the HttpResponseObject for files matching the request URI such as described here:

Servlet filter for browser caching?

Community
  • 1
  • 1
mxro
  • 6,588
  • 4
  • 35
  • 38