this one seem to work (with no side-effects):

---
package org.apache.turbine.mods.template;

import org.apache.turbine.util.template.TemplateLink;

import java.util.Date;

public class TemplateLinkEx extends
org.apache.turbine.util.template.TemplateLink {

    public TemplateLink setPage(java.lang.String t) {
        super.setPage(t);
        super.addPathInfo("nocacheid", new java.util.Date().getTime());
        return this;
    }
}
---


----- Original Message -----
From: "Costas Stergiou" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Andrea Papotti"
<[EMAIL PROTECTED]>
Sent: Tuesday, August 07, 2001 4:57 PM
Subject: Re: Browser cache control


> Also, you don't modify turbine source, you extend a class (you
> can set in TR.props the class to use in this case)...
> ----- Original Message -----
> From: "Andrea Papotti" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, August 07, 2001 5:30 PM
> Subject: Re: Browser cache control
>
>
> > Is it possible to do the same thing without modifing Turbine surce, but
by
> > using VTL's .addPathInfo() in a Velocimacro ?
> > (although I don't know how to get current time via VTL)
> >
> > Andrea.
> >
> > ----- Original Message -----
> > From: "Costas Stergiou" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Tuesday, August 07, 2001 10:07 AM
> > Subject: Re: Browser cache control
> >
> >
> > > Having searched on this issue, I realized that not all browsers
> > > (or their versions) behave always as expected with these directives.
> > > What I did to solve a similar problem was to subclass the
> > > TemplateLink class and add some code to always add a dummy
> > > path info variable so that the browser thinks that this is a different
> > > url. Below is the code.
> > >
> > > public class TemplateLinkEx extends TemplateLink {
> > >     public TemplateLinkEx() {
> > >         super();
> > >     }
> > >
> > >     public TemplateLinkEx(RunData data)
> > >     {
> > >         super(data);
> > >         addPathInfo("nocacheid", new java.util.Date().getTime());
> > >     }
> > > }
> > >
> > > I hope that helps.
> > > Costas
> > >
> > > ----- Original Message -----
> > > From: "Scott Eade" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Tuesday, August 07, 2001 8:05 AM
> > > Subject: Browser cache control
> > >
> > >
> > > > Because the data changes all of the time, I need to instruct all
> > > > browsers that surf to my turbine site to not use their cache nor
> > > > any other cache that may be sitting in a proxy server between
> > > > the browser and the web server.  To do this I currently have:
> > > >
> > > > $page.setHttpEquiv("Cache-Control", "no-cache")
> > > > $page.setHttpEquiv("Pragma", "no-cache")
> > > >
> > > > in my default page layout.  This clearly adds:
> > > >
> > > > <meta content="no-cache" http-equiv="Cache-Control">
> > > > <meta content="no-cache" http-equiv="Pragma">
> > > >
> > > > to the HTML output, but I am not sure if it is actually setting
> > > > the HTTP headers - the behaviour I am seeing is that it is
> > > > not.
> > > >
> > > > How can I set the actual HTTP headers so that the content
> > > > expires immediately?  Won't all template driven apps need
> > > > to expire their content pretty much immediately?
> > > >
> > > > Thanks,
> > > >
> > > > Scott
> > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail:
[EMAIL PROTECTED]
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to