← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17153: ContextUtils, proper headers for no cache, ignoring IE peculiarities

 

------------------------------------------------------------
revno: 17153
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-10-17 14:27:51 +0200
message:
  ContextUtils, proper headers for no cache, ignoring IE peculiarities
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/ContextUtils.java
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/ContextUtils.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/ContextUtils.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/ContextUtils.java	2014-10-03 08:27:43 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/utils/ContextUtils.java	2014-10-17 12:27:51 +0000
@@ -124,12 +124,7 @@
 
         if ( cacheStrategy == null || cacheStrategy.equals( CacheStrategy.NO_CACHE ) )
         {
-            // -----------------------------------------------------------------
-            // Cache set to expire after 1 second as IE 8 will not save cached
-            // responses to disk over SSL, was "no-cache".
-            // -----------------------------------------------------------------
-
-            response.setHeader( HEADER_CACHE_CONTROL, "max-age=1" );
+            response.setHeader( HEADER_CACHE_CONTROL, "no-cache, no-store" );
             response.setHeader( HEADER_EXPIRES, DateUtils.getExpiredHttpDateString() );
         }
         else if ( cacheStrategy.equals( CacheStrategy.CACHE_1_HOUR ) )

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/ContextUtils.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/ContextUtils.java	2014-08-15 07:40:20 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/ContextUtils.java	2014-10-17 12:27:51 +0000
@@ -115,12 +115,7 @@
 
         if ( disallowCache )
         {
-            // -----------------------------------------------------------------
-            // Cache set to expire after 1 second as IE 8 will not save cached
-            // responses to disk over SSL, was "no-cache".
-            // -----------------------------------------------------------------
-
-            response.setHeader( "Cache-Control", "max-age=1" );
+            response.setHeader( "Cache-Control", "no-cache, no-store" );
             response.setHeader( "Expires", DateUtils.getExpiredHttpDateString() );
         }