How to prevent browser from caching pages

2011-05-16 Thread Martin Makundi
Hi! We are disabling versioning and this results in problems with browsers (chrome) which seems to load pages from cache. We would like to add something similar as in NonCachingImage to each url. How can this be done centrally for whole application with minimal change? Something like: u

Re: How to prevent browser from caching pages

2011-05-16 Thread Pedro Santos
You can decorate applicaiton's root request mapper to set in the anticache parameter in the mapped URL. You can also add a listener invoking WebResponse#disableCaching for all your responses. On Mon, May 16, 2011 at 10:20 AM, Martin Makundi wrote: > Hi! > > We are disabling versioning and this re

Re: How to prevent browser from caching pages

2011-05-16 Thread Martin Makundi
Hi! Sounds nice, how exactly? ** Martin 2011/5/16 Pedro Santos : > You can decorate applicaiton's root request mapper to set in the > anticache parameter in the mapped URL. You can also add a listener > invoking WebResponse#disableCaching for all your responses. > > On Mon, May 16, 2011 at 10:20

Re: How to prevent browser from caching pages

2011-05-16 Thread Pedro Santos
I pasted an AnticacheDecorator here: http://pastebin.com/NDePsj0F you can use as: class Application { init(){ setRootRequestMapper(new AnticacheDecorator(getRootRequestMapper())); } } On Mon, May 16, 2011 at 11:36 AM, Martin Makundi wrote: > Hi! > > Sounds nice, how exactly? > > ** > M

Re: How to prevent browser from caching pages

2011-05-16 Thread Martin Grigorov
Pedro is talking about 1.5, not about 1.4.9 :-) On Mon, May 16, 2011 at 4:36 PM, Martin Makundi < martin.maku...@koodaripalvelut.com> wrote: > Hi! > > Sounds nice, how exactly? > > ** > Martin > > 2011/5/16 Pedro Santos : > > You can decorate applicaiton's root request mapper to set in the > > an

Re: How to prevent browser from caching pages

2011-05-16 Thread Martin Makundi
Ok.. how to do the same in 1.4 ? ** Martin 2011/5/16 Martin Grigorov : > Pedro is talking about 1.5, not about 1.4.9 :-) > > On Mon, May 16, 2011 at 4:36 PM, Martin Makundi < > martin.maku...@koodaripalvelut.com> wrote: > >> Hi! >> >> Sounds nice, how exactly? >> >> ** >> Martin >> >> 2011/5/16 P

Re: How to prevent browser from caching pages

2011-05-16 Thread Martin Grigorov
extend the url coding strategy you use and add the logic in its encode() method On Mon, May 16, 2011 at 5:18 PM, Martin Makundi < martin.maku...@koodaripalvelut.com> wrote: > Ok.. how to do the same in 1.4 ? > > ** > Martin > > 2011/5/16 Martin Grigorov : > > Pedro is talking about 1.5, not about

Re: How to prevent browser from caching pages

2011-05-16 Thread Martin Makundi
You mean here: protected WebResponse newWebResponse(HttpServletResponse servletResponse) { return (getRequestCycleSettings().getBufferResponse() ? new BufferedWebResponse(servletResponse) { /** * @see org.apache.wicket.protocol.http.WebResponse#encodeURL(java.lang.CharSequence)