×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
1
Language: Java
Posted by: Karthick Bala
Added: Jul 25, 2014 10:33 AM
Views: 9
Tags: no tags
  1.     public static void setCacheStatus(HttpServletResponse response){
  2.         // HTTP 1.1.
  3.         response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // No I18N
  4.  
  5.         // HTTP 1.0.
  6.         response.setHeader("Pragma", "no-cache"); // No I18N
  7.  
  8.         // Proxies.
  9.         response.setDateHeader("Expires", 0); // No I18N
  10.     }