You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@clerezza.apache.org by Tsuyoshi Ito <ts...@trialox.org> on 2010/10/28 11:20:26 UTC
IE Cache problem with repeating Ajax Requests
Hi Reto
I have tested our apps in IE and found out that requests are cached.
Especially ajax requests which returns JSON or RDF/JSON lead to
problems because the pages are not rendered correcty. What is an easy
way to set the request headers "Cache-Control":"no-cache" and
"Expires":"0" for html, json and rdf/json for IE in apache clerezza.
Or are there any better solution than changing header for requests with IE?
Thanks
Cheers
TSuy
Re: IE Cache problem with repeating Ajax Requests
Posted by Manuel Innerhofer <ma...@trialox.org>.
ok, added them.
On Thu, Oct 28, 2010 at 4:06 PM, Reto Bachmann-Gmuer <
reto.bachmann@trialox.org> wrote:
> Hi Manuel
>
> Thanks for implementing this!
>
> I'd suggest to be a tiny bit more restrictive and not to modify the headers
> even when a Last-Modified or an ETag header is present.
>
> CHeers,
> reto
>
> On Thu, Oct 28, 2010 at 3:42 PM, Manuel Innerhofer <manuel@trialox.org
> >wrote:
>
> > Hi Reto,
> >
> > in the CLEREZZA-344 in add a default cache-control header to the response
> > if
> > none is set. I was not sure what you meant with "serializer", I hope
> > interpreted you correctly. Please review it.
> >
> > Regards,
> > Manuel
> >
> > On Thu, Oct 28, 2010 at 2:39 PM, Reto Bachmann-Gmuer <
> > reto.bachmann@trialox.org> wrote:
> >
> > > Hi Tsuy
> > >
> > > Why do you think the headers hould only be added for IE? No Browser
> > should
> > > cache those responses. It can be done via means of jax-rs in the
> > individual
> > > root resource or typerenderer. Or maybe it should be the serializer to
> > add
> > > some reasonable (and configurable) defaults if this hasn't explicitely
> > been
> > > explicitely set by the Handler.
> > >
> > > Cheers,
> > > reto
> > >
> > >
> > > On Thu, Oct 28, 2010 at 11:20 AM, Tsuyoshi Ito <ts...@trialox.org>
> > > wrote:
> > >
> > > > Hi Reto
> > > >
> > > > I have tested our apps in IE and found out that requests are cached.
> > > > Especially ajax requests which returns JSON or RDF/JSON lead to
> > > > problems because the pages are not rendered correcty. What is an easy
> > > > way to set the request headers "Cache-Control":"no-cache" and
> > > > "Expires":"0" for html, json and rdf/json for IE in apache clerezza.
> > > >
> > > > Or are there any better solution than changing header for requests
> with
> > > IE?
> > > >
> > > > Thanks
> > > >
> > > > Cheers
> > > > TSuy
> > > >
> > >
> >
>
Re: IE Cache problem with repeating Ajax Requests
Posted by Tommaso Teofili <to...@gmail.com>.
2010/10/28 Reto Bachmann-Gmuer <re...@trialox.org>
> Thanks for implementing this!
>
> I'd suggest to be a tiny bit more restrictive and not to modify the headers
> even when a Last-Modified or an ETag header is present.
>
+1 it'd be fair to consider such HTTP headers too.
Tommaso
>
> CHeers,
> reto
>
> On Thu, Oct 28, 2010 at 3:42 PM, Manuel Innerhofer <manuel@trialox.org
> >wrote:
>
> > Hi Reto,
> >
> > in the CLEREZZA-344 in add a default cache-control header to the response
> > if
> > none is set. I was not sure what you meant with "serializer", I hope
> > interpreted you correctly. Please review it.
> >
> > Regards,
> > Manuel
> >
> > On Thu, Oct 28, 2010 at 2:39 PM, Reto Bachmann-Gmuer <
> > reto.bachmann@trialox.org> wrote:
> >
> > > Hi Tsuy
> > >
> > > Why do you think the headers hould only be added for IE? No Browser
> > should
> > > cache those responses. It can be done via means of jax-rs in the
> > individual
> > > root resource or typerenderer. Or maybe it should be the serializer to
> > add
> > > some reasonable (and configurable) defaults if this hasn't explicitely
> > been
> > > explicitely set by the Handler.
> > >
> > > Cheers,
> > > reto
> > >
> > >
> > > On Thu, Oct 28, 2010 at 11:20 AM, Tsuyoshi Ito <ts...@trialox.org>
> > > wrote:
> > >
> > > > Hi Reto
> > > >
> > > > I have tested our apps in IE and found out that requests are cached.
> > > > Especially ajax requests which returns JSON or RDF/JSON lead to
> > > > problems because the pages are not rendered correcty. What is an easy
> > > > way to set the request headers "Cache-Control":"no-cache" and
> > > > "Expires":"0" for html, json and rdf/json for IE in apache clerezza.
> > > >
> > > > Or are there any better solution than changing header for requests
> with
> > > IE?
> > > >
> > > > Thanks
> > > >
> > > > Cheers
> > > > TSuy
> > > >
> > >
> >
>
Re: IE Cache problem with repeating Ajax Requests
Posted by Reto Bachmann-Gmuer <re...@trialox.org>.
Hi Manuel
Thanks for implementing this!
I'd suggest to be a tiny bit more restrictive and not to modify the headers
even when a Last-Modified or an ETag header is present.
CHeers,
reto
On Thu, Oct 28, 2010 at 3:42 PM, Manuel Innerhofer <ma...@trialox.org>wrote:
> Hi Reto,
>
> in the CLEREZZA-344 in add a default cache-control header to the response
> if
> none is set. I was not sure what you meant with "serializer", I hope
> interpreted you correctly. Please review it.
>
> Regards,
> Manuel
>
> On Thu, Oct 28, 2010 at 2:39 PM, Reto Bachmann-Gmuer <
> reto.bachmann@trialox.org> wrote:
>
> > Hi Tsuy
> >
> > Why do you think the headers hould only be added for IE? No Browser
> should
> > cache those responses. It can be done via means of jax-rs in the
> individual
> > root resource or typerenderer. Or maybe it should be the serializer to
> add
> > some reasonable (and configurable) defaults if this hasn't explicitely
> been
> > explicitely set by the Handler.
> >
> > Cheers,
> > reto
> >
> >
> > On Thu, Oct 28, 2010 at 11:20 AM, Tsuyoshi Ito <ts...@trialox.org>
> > wrote:
> >
> > > Hi Reto
> > >
> > > I have tested our apps in IE and found out that requests are cached.
> > > Especially ajax requests which returns JSON or RDF/JSON lead to
> > > problems because the pages are not rendered correcty. What is an easy
> > > way to set the request headers "Cache-Control":"no-cache" and
> > > "Expires":"0" for html, json and rdf/json for IE in apache clerezza.
> > >
> > > Or are there any better solution than changing header for requests with
> > IE?
> > >
> > > Thanks
> > >
> > > Cheers
> > > TSuy
> > >
> >
>
Re: IE Cache problem with repeating Ajax Requests
Posted by Manuel Innerhofer <ma...@trialox.org>.
Hi Reto,
in the CLEREZZA-344 in add a default cache-control header to the response if
none is set. I was not sure what you meant with "serializer", I hope
interpreted you correctly. Please review it.
Regards,
Manuel
On Thu, Oct 28, 2010 at 2:39 PM, Reto Bachmann-Gmuer <
reto.bachmann@trialox.org> wrote:
> Hi Tsuy
>
> Why do you think the headers hould only be added for IE? No Browser should
> cache those responses. It can be done via means of jax-rs in the individual
> root resource or typerenderer. Or maybe it should be the serializer to add
> some reasonable (and configurable) defaults if this hasn't explicitely been
> explicitely set by the Handler.
>
> Cheers,
> reto
>
>
> On Thu, Oct 28, 2010 at 11:20 AM, Tsuyoshi Ito <ts...@trialox.org>
> wrote:
>
> > Hi Reto
> >
> > I have tested our apps in IE and found out that requests are cached.
> > Especially ajax requests which returns JSON or RDF/JSON lead to
> > problems because the pages are not rendered correcty. What is an easy
> > way to set the request headers "Cache-Control":"no-cache" and
> > "Expires":"0" for html, json and rdf/json for IE in apache clerezza.
> >
> > Or are there any better solution than changing header for requests with
> IE?
> >
> > Thanks
> >
> > Cheers
> > TSuy
> >
>
Re: IE Cache problem with repeating Ajax Requests
Posted by Tsuyoshi Ito <ts...@trialox.org>.
On Thu, Oct 28, 2010 at 2:39 PM, Reto Bachmann-Gmuer
<re...@trialox.org> wrote:
> Hi Tsuy
>
> Why do you think the headers hould only be added for IE? No Browser should
> cache those responses. It can be done via means of jax-rs in the individual
> root resource or typerenderer.
IE caches ajax request as default. Never saw/recongized this in
Chrome/Firefox. I think most of the jax-rs resources and typerender
don't want to cache the ajax requests - so default should be no cache.
Makes no sense for me to update all jaxrs resources and typrender
(there a lot of in our projects)
Or maybe it should be the serializer to add
> some reasonable (and configurable) defaults if this hasn't explicitely been
> explicitely set by the Handler.
What do you mean with serializer: MessageBodyWriter or somewhere in triaxrs?
>
> Cheers,
> reto
>
>
> On Thu, Oct 28, 2010 at 11:20 AM, Tsuyoshi Ito <ts...@trialox.org> wrote:
>
>> Hi Reto
>>
>> I have tested our apps in IE and found out that requests are cached.
>> Especially ajax requests which returns JSON or RDF/JSON lead to
>> problems because the pages are not rendered correcty. What is an easy
>> way to set the request headers "Cache-Control":"no-cache" and
>> "Expires":"0" for html, json and rdf/json for IE in apache clerezza.
>>
>> Or are there any better solution than changing header for requests with IE?
>>
>> Thanks
>>
>> Cheers
>> TSuy
>>
>
Re: IE Cache problem with repeating Ajax Requests
Posted by Reto Bachmann-Gmuer <re...@trialox.org>.
Hi Tsuy
Why do you think the headers hould only be added for IE? No Browser should
cache those responses. It can be done via means of jax-rs in the individual
root resource or typerenderer. Or maybe it should be the serializer to add
some reasonable (and configurable) defaults if this hasn't explicitely been
explicitely set by the Handler.
Cheers,
reto
On Thu, Oct 28, 2010 at 11:20 AM, Tsuyoshi Ito <ts...@trialox.org> wrote:
> Hi Reto
>
> I have tested our apps in IE and found out that requests are cached.
> Especially ajax requests which returns JSON or RDF/JSON lead to
> problems because the pages are not rendered correcty. What is an easy
> way to set the request headers "Cache-Control":"no-cache" and
> "Expires":"0" for html, json and rdf/json for IE in apache clerezza.
>
> Or are there any better solution than changing header for requests with IE?
>
> Thanks
>
> Cheers
> TSuy
>
Re: IE Cache problem with repeating Ajax Requests
Posted by Reto Bachmann-Gmuer <re...@trialox.org>.
On Thu, Oct 28, 2010 at 12:08 PM, Marcus Hilbe <mh...@gmail.com> wrote:
> use unique urls, like a random string as a parameter, that works always.
>
The stability URIs should provide refers to the represented resource, so
it's perfectly ok for a server to return varying representation over time,
using appropriate cache-header is the right thing to do here.
Cheers,
reto
>
> 2010/10/28 Tsuyoshi Ito <ts...@trialox.org>:
> > Hi Reto
> >
> > I have tested our apps in IE and found out that requests are cached.
> > Especially ajax requests which returns JSON or RDF/JSON lead to
> > problems because the pages are not rendered correcty. What is an easy
> > way to set the request headers "Cache-Control":"no-cache" and
> > "Expires":"0" for html, json and rdf/json for IE in apache clerezza.
> >
> > Or are there any better solution than changing header for requests with
> IE?
> >
> > Thanks
> >
> > Cheers
> > TSuy
> >
>
Re: IE Cache problem with repeating Ajax Requests
Posted by Marcus Hilbe <mh...@gmail.com>.
use unique urls, like a random string as a parameter, that works always.
2010/10/28 Tsuyoshi Ito <ts...@trialox.org>:
> Hi Reto
>
> I have tested our apps in IE and found out that requests are cached.
> Especially ajax requests which returns JSON or RDF/JSON lead to
> problems because the pages are not rendered correcty. What is an easy
> way to set the request headers "Cache-Control":"no-cache" and
> "Expires":"0" for html, json and rdf/json for IE in apache clerezza.
>
> Or are there any better solution than changing header for requests with IE?
>
> Thanks
>
> Cheers
> TSuy
>