tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julio Serje (@canada.com)" <jse...@home.com>
Subject Re: Tomcat, JSP and Cache
Date Thu, 07 Dec 2000 02:49:52 GMT
As a suggestion, to help making sure that a page is not  cached, add a
random parameter to the link, something like

<a href="whateverlink.html?rnd=<%=(int)(Math.random()*1000)%>

So at least every time the user reload this page the link will be different.
Of course this technique presents limitations (for example, the index pages,
etc) but may help in many cases.  This is a simple and practical workaround,
one that do not depend on a specific browser, proxie or.... type of user...
while Pilho Kim patch is considered by the developers and the bug is fixed..

We used this approach with a servlet that was used as the SRC of an IMG. The
servlet rendered a diferent image each time the page was served, but the
cache of the browser was just displaying the last version of the image. In
this case Pilho's bug wont fix the problem, but the random parameter will.


Julio


----- Original Message -----
From: Pilho Kim <phkim@math.soongsil.ac.kr>
To: Tomcat-Dev <tomcat-dev@jakarta.apache.org>
Cc: <tomcat-user@jakarta.apache.org>
Sent: Wednesday, December 06, 2000 9:05 PM
Subject: RE: Tomcat, JSP and Cache


> Hi,
>
> Tomcat 3.x and 4.0 have a Cache-Control Bug.
> But, none of Tomcat commiters know that.
> Because I am not a commiter, I cannot fix the Bug of Tomcat.
>
> Try to check my page:
>
>     http://www.javaclue.org/tomcat/patch32/dopatch.html
>
>
> Kim
>
>
>
> On Wed, 6 Dec 2000, Paulo Gaspar wrote:
>
> > That looks more like a browser/proxy issue.
> >
> > Notice that:
> >  - Internet Explorer often caches pages when it should NOT do it;
> >  - Internet Explorer sometimes even uses a cache copy when you refresh;
> >  - Some browsers ignore those meta tags.
> >  - Proxies (usualy) ignore those meta tags.
> >
> > Solutions I use:
> >  - To control page caching I use HTTP headers;
> >  - To avoid Internet Explorer caching issues I use Netscape 4.7x (the
> >    page doesn't look so good but caching and refresh realy work in a
> >    predictable way.
> >
> > For more info on caching issues and the relevant HTTP headers read...
> >
> > Basics and HTTP headers:
> >   http://www.netapp.com/products/netcache/cache_basics.html
> >
> >   http://www.mnot.net/cache_docs/
> >   or http://www.web-caching.com/mnot_tutorial/notes.html
> >
> > THE web caching site:
> >   http://www.web-caching.com/
> >
> > On Proxy caches:
> >   http://info.connect.com.au/docs/proxy/faq.html
> > and, if you like RFCs:
> >   http://www.faqs.org/rfcs/rfc2187.html
> >
> >
> > Have fun,
> > Paulo Gaspar
> >
> >
> > > -----Original Message-----
> > > From: Adress, David S. [mailto:David.S.Adress@pfizer.com]
> > > Sent: Tuesday, December 05, 2000 15:15
> > >
> > >
> > > I was wondering if anyone can help. I have tomcat server 3.1 running a
> > > servlet and jsp page.
> > > I have a servlet calling a jsp page with the redirect method. I've put
the
> > > required meta tags on the jsp page  so the page should not cache.
However,
> > > the page is still caching. In order for my page to display the proper
> > > results I need to have my browser reload. Are there any setups
> > > that need to
> > > be done to Tomcat or do I need to have a web server running also????
> > >
> > > Thanks
> > >
> > > -----Original Message-----
> > > From: Pier P. Fumagalli [mailto:pier@betaversion.org]
> > > Sent: Monday, December 04, 2000 3:49 PM
> > > To: Adress, David S.; 'webmaster@jakarta.apache.org'
> > > Subject: Re: Tomcat, JSP and Cache
> > >
> > >
> > > Adress, David S. <David.S.Adress@pfizer.com> wrote:
> > > >
> > > > I was wondering if you can help.
> > >
> > > Nope, I'm sorry... You'd better contact the Tomcat USERS mailing
> > > list. Check
> > > out <http://jakarta.apache.org/mail.html>
> > >
> > >     Pier
> > >
> > > > I have tomcat server running a jsp page.
> > > > I've put the required meta tags so the page should not cache.
> > > However, the
> > > > page is still caching. In order for my page to display the
> > > proper results
> > > I
> > > > need to have my browser reload. Are there any setups that need
> > > to be done
> > > to
> > > > Tomcat ???
> > > >
> > > > Thanks
> > > >
> > > --
> > > Pier P. Fumagalli  Apache Software Foundation
> > > <mailto:pier@betaversion.org>
> > > ------------------------------------------------------------------
> > > ----------
> >
> >
>


Mime
View raw message