you could define load strategies to ALL in order to request resources as combined packs.
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?
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
org.ajax4jsf.DEFAULT_EXPIREcontext init parameter.
Thanks, I'll check this.