[richfaces-issues] [JBoss JIRA] Commented: (RF-7452) org.ajax4jsf.DEFAULT_EXPIRE needs to override 'Pragma' header

Nick Belaevski (JIRA) jira-events at lists.jboss.org
Mon Jul 27 13:21:29 EDT 2009


    [ https://jira.jboss.org/jira/browse/RF-7452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12477774#action_12477774 ] 

Nick Belaevski commented on RF-7452:
------------------------------------

Richard,

Tomcat prevents caching of authenticated resources as security measure. Event static resources that reside in file system are not allowed to be cached (e.g. add /css/* pattern to <web-resource-collection>).

Here are some discussions on that:
http://www.jboss.org/community/wiki/DisableCacheControl
http://forum.servoy.com/viewtopic.php?f=11&t=11833

This fixed the problem for me: <Valve className="org.apache.catalina.authenticator.NonLoginAuthenticator" disableProxyCaching="false"/> 
The usage of alternative security solution like Seam or Acegi can be another workaround. 

> org.ajax4jsf.DEFAULT_EXPIRE needs to override 'Pragma' header
> -------------------------------------------------------------
>
>                 Key: RF-7452
>                 URL: https://jira.jboss.org/jira/browse/RF-7452
>             Project: RichFaces
>          Issue Type: Bug
>          Components: browser compatibility
>    Affects Versions: 3.3.1
>            Reporter: Richard Kennard
>            Assignee: Nick Belaevski
>             Fix For: 3.3.2.CR1
>
>         Attachments: addressbook-faces.war
>
>
> The flag org.ajax4jsf.DEFAULT_EXPIRE, which defaults to 86400, is meant to set client-side expiry for static resources (see RF-2506 and RF-4212). This is a great idea but it is incorrectly implemented.
> The problem is browsers differ on what they consider as the 'expires header'. For correct operation, a combination of 'Pragma', 'Cache-Control' and 'Expires' is needed. At the moment the code is setting 'Pragma: No-cache', which means expiry does not work on Firefox. If you use Firebug, you can see all the resources are reloaded every page.
> This is what RichFaces currently sets as its headers, by default:
> Pragma: No-cache
> Cache-Control: max-age=86400
> Expires: Fri, 26 Jun 2009 22:32:50 GMT
> This is what it should set:
> Pragma:
> Cache-Control: max-age=86400
> Expires: Fri, 26 Jun 2009 22:32:50 GMT

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-issues mailing list