myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karr, David" <david.k...@wamu.net>
Subject RE: [myfaces1.1.5][facelets 1.1.12] desable IE7 cache?
Date Fri, 15 Feb 2008 16:02:20 GMT
You might consider a phase listener that sends the typical cache-control
headers.  I use the following (although looking at it now, I think it
should probably only need to be a response phase):

public class CacheControlPhaseListener implements PhaseListener
{
    public void beforePhase(PhaseEvent event)
    {
        FacesContext facesContext = event.getFacesContext();
        HttpServletResponse response = (HttpServletResponse)
facesContext.getExternalContext().getResponse();
        response.addHeader("Pragma", "no-cache");
        response.addHeader("Cache-Control", "no-cache");
        response.addHeader("Cache-Control", "must-revalidate");
        response.addHeader("Cache-Control", "no-store");
        response.addHeader("Expires", "Mon, 8 Aug 2006 10:00:00 GMT");
// some date in the past
    }

    public void afterPhase(PhaseEvent event) { }

    public PhaseId getPhaseId()
    {
        return PhaseId.ANY_PHASE;
    }
} 

> -----Original Message-----
> From: lmk [mailto:lotfi65@yahoo.fr] 
> Sent: Friday, February 15, 2008 12:56 AM
> To: users@myfaces.apache.org
> Subject: Re: [myfaces1.1.5][facelets 1.1.12] desable IE7 cache?
> 
> 
> 
> lmk wrote:
> > 
> > hello,
> > I have some  issues using  ajax features with myfaces and 
> facelets, it 
> > seems that IE7 keep  xml request component on cache how to avoid, 
> > disable using IE cache?
> > environement: myfaces 1.1.5,facelets 1.1.13,rich-faces 1.1.4.
> > regards!
> > 
> 
> no ideas.??
> 
> thanks.
> --
> View this message in context: 
> http://www.nabble.com/-myfaces1.1.5--facelets-1.1.12--desable-
> IE7--cache--tp15480674p15496151.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> 
> 
> 

Mime
View raw message