Details
Description
Without the expires header the binaries don't get cached properly and the browser will try to refetch the binaries every time.
The StaticResourceServlet does the following:
if (lastModified > 0L)
{ response.setDateHeader("Last-Modified", lastModified); long expires = (System.currentTimeMillis() - lastModified); response.setDateHeader("Expires", expires + System.currentTimeMillis()); response.setHeader("Cache-Control", "max-age=" + (expires / 1000)); }this logic should be added to the BinariesServlet as well.
It could also be useful to be able to add a init parameter with which caching for certain resources can be turned off completely by explicity setting Cache-Control: no-cache headers.