You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Scott Eade <se...@backstagetech.com.au> on 2001/08/07 07:05:29 UTC

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: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Browser cache control

Posted by Costas Stergiou <cs...@aias.gr>.
That's my point!
just add to TR.props the line
tool.request.link=org.apache.turbine.mods.template.TemplateLinkEx
That's all.
Costas

----- Original Message -----
From: "Andrea Papotti" <bi...@ettelematica.it>
To: <tu...@jakarta.apache.org>
Sent: Tuesday, August 07, 2001 8:27 PM
Subject: Re: Browser cache control


> 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" <cs...@aias.gr>
> To: <tu...@jakarta.apache.org>; "Andrea Papotti"
> <bi...@ettelematica.it>
> 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" <bi...@ettelematica.it>
> > To: <tu...@jakarta.apache.org>
> > 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" <cs...@aias.gr>
> > > To: <tu...@jakarta.apache.org>
> > > 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" <se...@backstagetech.com.au>
> > > > To: <tu...@jakarta.apache.org>
> > > > 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:
turbine-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail:
> turbine-user-help@jakarta.apache.org
> > > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
turbine-user-help@jakarta.apache.org
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> > >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Browser cache control

Posted by Andrea Papotti <bi...@ettelematica.it>.
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" <cs...@aias.gr>
To: <tu...@jakarta.apache.org>; "Andrea Papotti"
<bi...@ettelematica.it>
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" <bi...@ettelematica.it>
> To: <tu...@jakarta.apache.org>
> 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" <cs...@aias.gr>
> > To: <tu...@jakarta.apache.org>
> > 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" <se...@backstagetech.com.au>
> > > To: <tu...@jakarta.apache.org>
> > > 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: turbine-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
turbine-user-help@jakarta.apache.org
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Browser cache control

Posted by Costas Stergiou <cs...@aias.gr>.
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" <bi...@ettelematica.it>
To: <tu...@jakarta.apache.org>
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" <cs...@aias.gr>
> To: <tu...@jakarta.apache.org>
> 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" <se...@backstagetech.com.au>
> > To: <tu...@jakarta.apache.org>
> > 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: turbine-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Browser cache control

Posted by John McNally <jm...@collab.net>.
Costas' example did not modify Turbine source.  It extended the tool. 
You then modify TR.props to use the extended tool.

john mcnally

Andrea Papotti wrote:
> 
> 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" <cs...@aias.gr>
> To: <tu...@jakarta.apache.org>
> 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
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Browser cache control

Posted by Costas Stergiou <cs...@aias.gr>.
I suppose yes, but you have to do it for each link. You should also
create a variable to get the current date each time (I think so)

----- Original Message -----
From: "Andrea Papotti" <bi...@ettelematica.it>
To: <tu...@jakarta.apache.org>
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" <cs...@aias.gr>
> To: <tu...@jakarta.apache.org>
> 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" <se...@backstagetech.com.au>
> > To: <tu...@jakarta.apache.org>
> > 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: turbine-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Browser cache control

Posted by Andrea Papotti <bi...@ettelematica.it>.
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" <cs...@aias.gr>
To: <tu...@jakarta.apache.org>
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" <se...@backstagetech.com.au>
> To: <tu...@jakarta.apache.org>
> 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: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Browser cache control

Posted by Costas Stergiou <cs...@aias.gr>.
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" <se...@backstagetech.com.au>
To: <tu...@jakarta.apache.org>
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: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Browser cache control

Posted by Scott Eade <se...@backstagetech.com.au>.
From: "Keng Wong" <ke...@verizon.net>
> Try adding these as well:
> 
> $page.setHttpEquiv("Cache-Control", "no-store")
> $page.setDateHeader("Expires", "-1")
> 
> -keng wong

I was able to find some very helpful information from those
excellent microsoft people :-)

http://support.microsoft.com/support/kb/articles/Q234/0/67.ASP

It turns out that HTTP-EQUIV is a not so great way of setting 
the equivalent of the HTTP headers and that IE 4 & 5 actually
ignore HTTP-EQUIV "Cache-control" tags!

I'm giving:

<META HTTP-EQUIV="Expires" CONTENT="-1">

a shot, but if that fails I'll try Costa's suggestion of including
a dummy path info variable.

Is there any reason why Turbine does not provide direct access 
to HttpServletResponse.setHeader()?  I guess there is nothing
to stop me from going:

$data.getResponse.setHeader("Cache-control", "no-cache")

in my default layout.  I'll probably try this before the dummy 
path info variable solution.


Thanks everyone for your comments.

Scott



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


RE: Browser cache control

Posted by Keng Wong <ke...@verizon.net>.
Try adding these as well:

$page.setHttpEquiv("Cache-Control", "no-store")
$page.setDateHeader("Expires", "-1")

-keng wong

> -----Original Message-----
> From: Scott Eade [mailto:seade@backstagetech.com.au]
> Sent: Monday, August 06, 2001 10:05 PM
> To: turbine-user@jakarta.apache.org
> 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")
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org