Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-1153

BinariesServlet doesn't set Expires header

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • High
    • Resolution: Won't Fix
    • 2.04.06, 2.04.07
    • 2.04.08, 2.05.01, 2.10.01
    • None
    • None

    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.

      Attachments

        Activity

          People

            aschrijvers Ard Schrijvers
            bvdschans Bart van der Schans (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: