I noticed that when we use DWR, there are many requests to java-script files from the browser. It appeared that DWR scripts are not being cached by the browser.
The response headers for the repeat downloads looked like:
How to add Last-Modified in the response?
I'm surprised that this isn't built into DWR. You could always configure a custom Servlet Filter in your web application. It's fair enough to assume that the script won't change for the lifetime of the ServletContext. Perhaps you could store a timestamp as the webapp starts and have the filter set the Last-Modified header for
©2020 All rights reserved.