2 Replies Latest reply on Oct 14, 2013 3:02 PM by Amit Tikoo

    JSF/ RIchfaces Performance on Google Chrome due to HTTP 304 responses

    Amit Tikoo Newbie

      We are creating an application using JSF 2.0 / Richfaces 4.2.2. The page is loading fast in IE9(3-4 secs) but is painfully slow in Chrome.

      Looking at the Network the problem seems to be that for most JSF & Richfaces resources, the browser gets a 304 response but it is talking long(I'm talking minutes) to finally get these resources.

      My web.xml:


      <description> Set the max time in miliseconds set on the "Expires" header for a resource rendered by the default ResourceHandler. </description>


      <param-value>2592000000</param-value><!-- 30 Days --> </context-param>

      <!-- RichFaces -->


      <description>Defines in seconds how long streamed back to browser resources can be cached.</description>


      <param-value>2592000</param-value><!-- 30 Days -->




      <param-value>false</param-value> </context-param> <context-param>






      <param-value>ALL</param-value> </context-param> <context-param

      > <!-- If org.richfaces.LoadScriptStrategy is set to ALL, this should be false -->




      Sample request/response for one of the resources(Chrome)

      Request URL:http://localhost/weblogicOMIA1003/APOMIA1003/faces/javax.faces.resource/calendar.js?ln=org.richfaces

      Request Method:GET Status Code:304 Not Modified Request Headersview source

      Accept:*/* Accept-Encoding:gzip,deflate,sdch Accept-Language:en-US,en;q=0.8


      Connection:keep-alive Cookie:JSESSIONID=RTJDSDYGFNnmDSVLySxVMJBJyhhm2GKSLtwPXmLtllqy9xh1MJjY!1711646894

      Host: If-Modified-Since:Wed, 17 Oct 2012 18:13:54 GMT


      User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.76 Safari/537.36

      Query String Parametersview sourceview URL encoded ln:org.richfaces Response

      Headersview source X-Powered-By:Servlet/3.0 JSP/2.2 X-Powered-By:JSF/2.0 X-UA-Compatible:IE=edge