Example usage for org.springframework.http HttpHeaders PRAGMA

List of usage examples for org.springframework.http HttpHeaders PRAGMA

Introduction

In this page you can find the example usage for org.springframework.http HttpHeaders PRAGMA.

Prototype

String PRAGMA

To view the source code for org.springframework.http HttpHeaders PRAGMA.

Click Source Link

Document

The HTTP Pragma header field name.

Usage

From source file:net.turnbig.pandora.web.Servlets.java

/**
 * ?Header./* w w  w.ja va 2 s . c om*/
 */
public static void setNoCacheHeader(HttpServletResponse response) {
    // Http 1.0 header
    response.setDateHeader(HttpHeaders.EXPIRES, 1L);
    response.addHeader(HttpHeaders.PRAGMA, "no-cache");
    // Http 1.1 header
    response.setHeader(HttpHeaders.CACHE_CONTROL, "no-cache, no-store, max-age=0");
}