You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by alexandre mazouz <al...@hotmail.com> on 2008/02/11 16:39:11 UTC

Cache Browser

Hello,

I'm sorry if this question has already been asked but  I have already tried all and it doesn't work.

I'm using Cocoon 2.1.7/Jetty, Firefox and IE.


I have 2 web applications A and B in localhost with the same adress and ports (127.0.0.1:8080\) in 2 server jetty (J1 and J2).

A and B only share the browser.

When i launch A all is well.

But after, if i close A and launch B i have A.

The only way to have B is to clean the cache of the browser.

And i don't want to clean the cache every time i switch to another application.

Is there a way to solve my problem?


Thanks a lot,
Alexandre

ps : i have already tested all the meta tags, noncaching.




_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

RE: Cache Browser

Posted by alexandre mazouz <al...@hotmail.com>.

ok, i understand.

Thanks for your help.
> Date: Mon, 11 Feb 2008 16:41:26 -0500
> From: solprovider@apache.org
> To: users@cocoon.apache.org
> Subject: Re: Cache Browser
> 
> Web development PCs should set the browsers to use the cache as little
> as possible.  Otherwise much time is wasted analyzing bugs that no
> longer exist but still appear because the browser has not refreshed.
> 
> The "reload" (Mozilla) or "refresh" (MSIE) command should force
> browsers to ignore cache and retrieve the entire page from the server.
>  This is not always effective.
> 
> You can also use the HTTP Header:
> <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
> MSIE ignored this in early versions.  I forget when I tested, probably
> MSIE 3 or 5.  I have not tested more recent browsers.  The
> HttpCacheAction sets the Last-Modified, Expires and Cache-Control
> Headers, but not the old no-cache header (replaced by the
> Cache-Control header.)
> 
> I use the same port for several Cocoon apps without problem, but I do
> not switch often and probably recompile before starting each server.
> 
> As Tobia stated, your best option is to use different ports.  Browsers
> are not designed to handle pages changing without using a more recent
> modification time.
> 
> solprovider
> 
> On 2/11/08, alexandre mazouz <al...@hotmail.com> wrote:
> >  Thank you for your help.
> > Your tip works well when you want to switch from A to B or B to A.
> >
> > But if A is older than B, i will be able to switch from A to B but not B to
> > A.
> > Is it possible to bypass this problem ?
> >
> > Thanks,
> > Alexandre
> > > From: tobia.conforto@linux.it
> > > To: users@cocoon.apache.org
> > > Subject: Re: Cache Browser
> > > Date: Mon, 11 Feb 2008 17:20:11 +0100
> > > alexandre mazouz wrote:
> > > > I have 2 web applcations A and B in localhost with the same adress
> > > > and ports (127.0.0.1:8080\) in 2 server jetty (J1 and J2).
> > > > i close A and launch B i have A.
> > > > The only way to have B is to clean the cache of the browser.
> > >
> > > You might try to define an action that sets the relevant HTTP headers
> > > to prevent caching in the browser:
> > > <map:action name="no-cache"
> > > src="org.apache.cocoon.acting.HttpCacheAction"/>
> > >
> > > and call it at the beginning of your pipelines (even before any
> > > <map:match>, if you want it to affect every request):
> > > <map:act type="no-cache"/>
> > >
> > > Although in your case I would simply change the port of one of your
> > > servers, as the browser cache has its uses.
> > > Tobia
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

Re: Cache Browser

Posted by Tobia Conforto <to...@linux.it>.
solprovider@apache.org wrote:
> The "reload" (Mozilla) or "refresh" (MSIE) command should force  
> browsers to ignore cache and retrieve the entire page from the  
> server. This is not always effective.

This reminds me, Shift+Reload forces the browser to refresh the entire  
page, including all dependencies, I believe on both browsers.  I use  
it all the time while developing, so I forgot to mention it.


Tobia

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Cache Browser

Posted by so...@apache.org.
Web development PCs should set the browsers to use the cache as little
as possible.  Otherwise much time is wasted analyzing bugs that no
longer exist but still appear because the browser has not refreshed.

The "reload" (Mozilla) or "refresh" (MSIE) command should force
browsers to ignore cache and retrieve the entire page from the server.
 This is not always effective.

You can also use the HTTP Header:
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
MSIE ignored this in early versions.  I forget when I tested, probably
MSIE 3 or 5.  I have not tested more recent browsers.  The
HttpCacheAction sets the Last-Modified, Expires and Cache-Control
Headers, but not the old no-cache header (replaced by the
Cache-Control header.)

I use the same port for several Cocoon apps without problem, but I do
not switch often and probably recompile before starting each server.

As Tobia stated, your best option is to use different ports.  Browsers
are not designed to handle pages changing without using a more recent
modification time.

solprovider

On 2/11/08, alexandre mazouz <al...@hotmail.com> wrote:
>  Thank you for your help.
> Your tip works well when you want to switch from A to B or B to A.
>
> But if A is older than B, i will be able to switch from A to B but not B to
> A.
> Is it possible to bypass this problem ?
>
> Thanks,
> Alexandre
> > From: tobia.conforto@linux.it
> > To: users@cocoon.apache.org
> > Subject: Re: Cache Browser
> > Date: Mon, 11 Feb 2008 17:20:11 +0100
> > alexandre mazouz wrote:
> > > I have 2 web applcations A and B in localhost with the same adress
> > > and ports (127.0.0.1:8080\) in 2 server jetty (J1 and J2).
> > > i close A and launch B i have A.
> > > The only way to have B is to clean the cache of the browser.
> >
> > You might try to define an action that sets the relevant HTTP headers
> > to prevent caching in the browser:
> > <map:action name="no-cache"
> > src="org.apache.cocoon.acting.HttpCacheAction"/>
> >
> > and call it at the beginning of your pipelines (even before any
> > <map:match>, if you want it to affect every request):
> > <map:act type="no-cache"/>
> >
> > Although in your case I would simply change the port of one of your
> > servers, as the browser cache has its uses.
> > Tobia

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


RE: Cache Browser

Posted by alexandre mazouz <al...@hotmail.com>.
Thank you for your help.

Your tip works well when you want to switch from A to B or B to A.

But if A is older than B, i will be able to switch from A to B but not B to A.

Is it possible to bypass this problem ?

Thanks,
Alexandre
> From: tobia.conforto@linux.it
> To: users@cocoon.apache.org
> Subject: Re: Cache Browser
> Date: Mon, 11 Feb 2008 17:20:11 +0100
> 
> alexandre mazouz wrote:
> > I have 2 web applcations A and B in localhost with the same adress  
> > and ports (127.0.0.1:8080\) in 2 server jetty (J1 and J2).
> > i close A and launch B i have A.
> > The only way to have B is to clean the cache of the browser.
> 
> You might try to define an action that sets the relevant HTTP headers  
> to prevent caching in the browser:
> 
> 	<map:action name="no-cache"  
> src="org.apache.cocoon.acting.HttpCacheAction"/>
> 
> and call it at the beginning of your pipelines (even before any  
> <map:match>, if you want it to affect every request):
> 
> 	<map:act type="no-cache"/>
> 
> Although in your case I would simply change the port of one of your  
> servers, as the browser cache has its uses.
> 
> 
> Tobia
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

Re: Cache Browser

Posted by Tobia Conforto <to...@linux.it>.
alexandre mazouz wrote:
> I have 2 web applcations A and B in localhost with the same adress  
> and ports (127.0.0.1:8080\) in 2 server jetty (J1 and J2).
> i close A and launch B i have A.
> The only way to have B is to clean the cache of the browser.

You might try to define an action that sets the relevant HTTP headers  
to prevent caching in the browser:

	<map:action name="no-cache"  
src="org.apache.cocoon.acting.HttpCacheAction"/>

and call it at the beginning of your pipelines (even before any  
<map:match>, if you want it to affect every request):

	<map:act type="no-cache"/>

Although in your case I would simply change the port of one of your  
servers, as the browser cache has its uses.


Tobia


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org