7 Replies Latest reply on Jun 26, 2008 5:20 PM by Sergey Smirnov

    Expires headers for Richfaces css and javascript files

    Wim Bervoets Newbie

      Hi,

      By default the Richfaces css and javascript files are streamed back to the browser with an Expires header of 1 day, eg:

      /faces/a4j_3_1_4.GAorg/richfaces/skin.xcss/DATB/eAGL[snip]

      Response Headers
      Date: Wed, 12 Mar 2008 10:45:54 GMT
      Content-Type: text/css
      Expires: Thu, 13 Mar 2008 10:45:54 GMT
      Last-Modified: Wed, 12 Mar 2008 10:29:58 GMT
      Transfer-Encoding: chunked
      Cache-Control: max-age=86400

      /faces/a4j_3_1_4.GAorg/ajax4jsf/framework.pack.js

      Response Headers
      Date: Wed, 12 Mar 2008 10:45:53 GMT
      Content-Length: 269927
      Content-Type: text/javascript
      Expires: Thu, 13 Mar 2008 10:45:53 GMT
      Last-Modified: Wed, 12 Mar 2008 10:29:58 GMT
      Transfer-Encoding: chunked
      Cache-Control: max-age=86400

      /faces/a4j_3_1_4.GAorg/richfaces/ui.pack.js

      Is there a way to modify the default Expires header? Eg. set it to 1 month or 1 year?
      (possible as a4j_3_1_4.GAorg is in the url and will change whenever we upgrade to a newer version).

      My question is actually inspired by the YSlow guideline at: http://developer.yahoo.com/performance/rules.html#expires

      Thanks in advance,
      Wim