Subversion Repository Public Repository

litesoft

Diff Revisions 949 vs 950 for /trunk/Java/GWT/OldServer/src/org/litesoft/GWT/eventbus/server/ServletUtils.java

Diff revisions: vs.
  @@ -1,36 +1,36 @@
1 - // This Source Code is in the Public Domain per: http://unlicense.org
2 - package org.litesoft.GWT.eventbus.server;
3 -
4 - import javax.servlet.http.*;
5 -
6 - public class ServletUtils {
7 - public static void noCache( HttpServletResponse pResponse ) {
8 - // HTTP 1.0:
9 -
10 - pResponse.addHeader( "Pragma", "no-cache" ); // Only cache directive for this level
11 -
12 - // HTTP 1.1:
13 -
14 - // Indicate page expired back at the epoc and should be
15 - // treated as stale (Hopefully caches conform).
16 - pResponse.addDateHeader( "Expires", 0 );
17 -
18 - // The following are for Cache Management:
19 -
20 - // Browser Caching:
21 -
22 - // Indicates caching allowed, but should check if current.
23 - pResponse.addHeader( "Cache-Control", "no-cache" );
24 -
25 - // Indicates maximum staleness of 0 seconds.
26 - pResponse.addHeader( "Cache-Control", "max-stale=0" );
27 -
28 - // Browser & Intermediate Caching (anywhere from web server thru to the browser):
29 -
30 - // Indicates content should not be cached by a shared cache (e.g. a proxy server).
31 - pResponse.addHeader( "Cache-Control", "private" );
32 -
33 - // Indicates that NO part of the response or the request should be cached.
34 - pResponse.addHeader( "Cache-Control", "no-store" );
35 - }
36 - }
1 + // This Source Code is in the Public Domain per: http://unlicense.org
2 + package org.litesoft.GWT.eventbus.server;
3 +
4 + import javax.servlet.http.*;
5 +
6 + public class ServletUtils {
7 + public static void noCache( HttpServletResponse pResponse ) {
8 + // HTTP 1.0:
9 +
10 + pResponse.addHeader( "Pragma", "no-cache" ); // Only cache directive for this level
11 +
12 + // HTTP 1.1:
13 +
14 + // Indicate page expired back at the epoc and should be
15 + // treated as stale (Hopefully caches conform).
16 + pResponse.addDateHeader( "Expires", 0 );
17 +
18 + // The following are for Cache Management:
19 +
20 + // Browser Caching:
21 +
22 + // Indicates caching allowed, but should check if current.
23 + pResponse.addHeader( "Cache-Control", "no-cache" );
24 +
25 + // Indicates maximum staleness of 0 seconds.
26 + pResponse.addHeader( "Cache-Control", "max-stale=0" );
27 +
28 + // Browser & Intermediate Caching (anywhere from web server thru to the browser):
29 +
30 + // Indicates content should not be cached by a shared cache (e.g. a proxy server).
31 + pResponse.addHeader( "Cache-Control", "private" );
32 +
33 + // Indicates that NO part of the response or the request should be cached.
34 + pResponse.addHeader( "Cache-Control", "no-store" );
35 + }
36 + }