-
1. Re: Reason RichFaces doesn't set client-side Expiry headers?
ilya_shaikovsky Jun 24, 2009 7:02 AM (in response to kennardconsulting)you could define load strategies to ALL in order to request resources as combined packs.
-
2. Re: Reason RichFaces doesn't set client-side Expiry headers?
kennardconsulting Jun 24, 2009 9:15 PM (in response to kennardconsulting)Ilya,
Thank you for your prompt reply.
Unfortunately I believe your suggestion is orthogonal to mine. I don't use every RichFaces widget, so I'm not keen to load everything as a combined pack.
All I'm asking is not to reload the resources for every page. As an experiment I tried putting a filter around RichFaces...<filter> <filter-name>ExpiryFilter</filter-name> <filter-class>com.kennardconsulting.core.servlet.http.HttpResponseHeadersFilter</filter-class> <init-param> <param-name>ExpiresInMinutes</param-name> <param-value>60</param-value> </init-param> </filter> <filter-mapping> <filter-name>ExpiryFilter</filter-name> <url-pattern>/a4j/s/*</url-pattern> <url-pattern>/a4j/g/*</url-pattern> </filter-mapping>
...this succeeded in significantly reducing my HTTP requests (down from over 10 per page to 1 per page) without any ill effects that I can see.
Is there a reason this isn't done by default? Perhaps I should open a JIRA?
Regards,
Richard. -
3. Re: Reason RichFaces doesn't set client-side Expiry headers?
ilya_shaikovsky Jun 25, 2009 6:17 AM (in response to kennardconsulting)Nick already works under your question but seems has no quick answer. Yes feel free to create issue in order to be updated with the results of his investigations.
B.t.w. you could load your resources as combined pack even if you not need all the components resources. read about our new Maven resource dependency plugin. https://www.jboss.org/community/docs/DOC-13329 -
4. Re: Reason RichFaces doesn't set client-side Expiry headers?
nbelaevski Jun 25, 2009 7:42 AM (in response to kennardconsulting)Try setting
org.ajax4jsf.DEFAULT_EXPIRE
context init parameter. -
5. Re: Reason RichFaces doesn't set client-side Expiry headers?
kennardconsulting Jun 25, 2009 6:51 PM (in response to kennardconsulting)Nick,
Thanks for your reply.
That flag appears to be the right idea but wrongly implemented. I have opened a JIRA: https://jira.jboss.org/jira/browse/RF-7452
Regards,
Richard. -
6. Re: Reason RichFaces doesn't set client-side Expiry headers?
nbelaevski Jun 25, 2009 7:49 PM (in response to kennardconsulting)Hi Richard,
Thanks, I'll check this.