You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Erik Brakkee <er...@gmail.com> on 2010/07/23 13:39:06 UTC

Correct way to disable browser caching...

Hi,


I would like to disable browser caching of certain pages. What is the
simplest way to to do this?
Right now I am removing the page from the pagemap after form submit, but the
browser still goes back and only resubmission is prevented.

Using the HTML expire tag is an option but it is probably better to use an
HTTP header instead. How is this done using wicket?

Cheers
  Erik

Re: Correct way to disable browser caching...

Posted by Erik Brakkee <er...@gmail.com>.
Solved it already. Just have to override  setHeaders() in my page:

        aResponse.setHeader("Pragma", "no-cache");
        aResponse.setHeader("Cache-Control",
            "no-cache, max-age=0, must-revalidate, no-store");



On Fri, Jul 23, 2010 at 1:39 PM, Erik Brakkee <er...@gmail.com>wrote:

> Hi,
>
>
> I would like to disable browser caching of certain pages. What is the
> simplest way to to do this?
> Right now I am removing the page from the pagemap after form submit, but
> the browser still goes back and only resubmission is prevented.
>
> Using the HTML expire tag is an option but it is probably better to use an
> HTTP header instead. How is this done using wicket?
>
> Cheers
>   Erik
>