Skip to content

Instantly share code, notes, and snippets.

@mattbrictson
Created October 29, 2011 00:08

Revisions

  1. mattbrictson revised this gist Oct 29, 2011. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions 02-SamplePage.java
    Original file line number Diff line number Diff line change
    @@ -7,6 +7,5 @@ protected void configureResponse(WebResponse response)
    super.configureResponse(response);
    response.setHeader(
    "Cache-Control",
    "no-cache, max-age=0, must-revalidate, no-store"
    );
    "no-cache, max-age=0, must-revalidate, no-store");
    }
  2. mattbrictson revised this gist Oct 29, 2011. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions 02-SamplePage.java
    Original file line number Diff line number Diff line change
    @@ -2,10 +2,9 @@
    * Disable browser back button cache.
    */
    @Override
    protected void configureResponse()
    protected void configureResponse(WebResponse response)
    {
    super.configureResponse();
    WebResponse response = getWebRequestCycle().getWebResponse();
    super.configureResponse(response);
    response.setHeader(
    "Cache-Control",
    "no-cache, max-age=0, must-revalidate, no-store"
  3. mattbrictson created this gist Oct 29, 2011.
    1 change: 1 addition & 0 deletions 01-headers
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    Cache-Control: no-cache, max-age=0, must-revalidate, no-store
    13 changes: 13 additions & 0 deletions 02-SamplePage.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    /**
    * Disable browser back button cache.
    */
    @Override
    protected void configureResponse()
    {
    super.configureResponse();
    WebResponse response = getWebRequestCycle().getWebResponse();
    response.setHeader(
    "Cache-Control",
    "no-cache, max-age=0, must-revalidate, no-store"
    );
    }