Skip to content Skip to sidebar Skip to footer

Disable Browser Caching HTML5

I would like to know how to disable the browser cache, using HTML5. I found this useful post (How to control web page caching, across all browsers?), but it contains the info only

Solution 1:

In order to disable the browser cache with HTML5, you can act on the Spring Security configuration class, as in the example:

@Configuration
@EnableWebMvcSecurity
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
...
@Override
protected void configure(final HttpSecurity http) {
   ...
   http.headers().cacheControl().disable();
}

Solution 2:


Post a Comment for "Disable Browser Caching HTML5"