Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Then fixing almost all cases: MS IE (how could we miss it?)
and Proxy caches that might cache things between us and
client.
  • Loading branch information
cstamas committed Nov 23, 2012
1 parent 5d54a3d commit 150df79
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -195,10 +195,12 @@ public Object get( Context context, Request request, Response response, Variant


private void addNoCacheHeaders( final Response response ) private void addNoCacheHeaders( final Response response )
{ {
// NXCM-5155 Force browsers to not cache this page // NEXUS-5155 Force browsers to not cache this page
final Series<Parameter> headers = ( (HttpResponse) response ).getHttpCall().getResponseHeaders(); final Series<Parameter> headers = ( (HttpResponse) response ).getHttpCall().getResponseHeaders();
headers.add( "Pragma", "no-cache" ); headers.add( "Pragma", "no-cache" ); // HTTP/1.0
headers.add( "Cache-Control", "no-cache, no-store, max-age=0, must-revalidate" ); headers.add( "Cache-Control", "no-cache, no-store, max-age=0, must-revalidate" ); // HTTP/1.1
headers.add( "Cache-Control", "post-check=0, pre-check=0" ); // MS IE
headers.add( "Expires", "0" ); // No caching on Proxies in between client and Nexus
} }


@Override @Override
Expand Down

0 comments on commit 150df79

Please sign in to comment.