3 Replies Latest reply on Jun 3, 2009 6:14 PM by Cody Lerum

    How to disable browser cache

    Oleg Kuznetsov Newbie

      How to disable browser cache?


      The following code in web.xml doesn't work:


      <filter>
            <filter-name>CacheControlFilter</filter-name>
            <filter-class>org.jboss.web.tomcat.filters.ReplyHeaderFilter</filter-class>
            <init-param>
              <param-name>Cache-Control</param-name>
              <param-value>no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0</param-value>
            </init-param>
            <init-param>
              <param-name>Pragma</param-name>
              <param-value>no-cache</param-value>
            </init-param>
          </filter>
      
          <filter-mapping>
            <filter-name>CacheControlFilter</filter-name>
            <url-pattern>/*</url-pattern>
          </filter-mapping>