dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16264
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6147: Put caching to 1 second as IE 8 will not save cached content to disk over SSL
------------------------------------------------------------
revno: 6147
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-03-02 09:21:54 +0100
message:
Put caching to 1 second as IE 8 will not save cached content to disk over SSL
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/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/api/utils/ContextUtils.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/ContextUtils.java 2012-01-24 15:19:23 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/utils/ContextUtils.java 2012-03-02 08:21:54 +0000
@@ -64,7 +64,12 @@
if ( disallowCache )
{
- response.addHeader( "Cache-Control", "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( "Cache-Control", "max-age=1" );
response.addHeader( "Expires", DateUtils.getExpiredHttpDateString() );
}
=== 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 2012-03-01 16:25:18 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/util/ContextUtils.java 2012-03-02 08:21:54 +0000
@@ -125,7 +125,12 @@
if ( disallowCache )
{
- response.setHeader( "Cache-Control", "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( "Cache-Control", "max-age=1" );
response.setHeader( "Expires", DateUtils.getExpiredHttpDateString() );
}