java - Browser Cache Headers Change on Server (Spring MVC + tomcat) -


my spring mvc app works on localhost. have following bean set browser caches:

    public void addresourcehandlers(final resourcehandlerregistry registry) {     // @formatter:off     registry.addresourcehandler("/doc/**").addresourcelocations("/web-inf/doc/").setcachecontrol(default_browser_cache_control);     registry.addresourcehandler("/style/**").addresourcelocations("/web-inf/style/").setcachecontrol(default_browser_cache_control);     registry.addresourcehandler("/image/**").addresourcelocations("/web-inf/image/").setcachecontrol(default_browser_cache_control);     registry.addresourcehandler("/javascript/**").addresourcelocations("/web-inf/javascript/").setcachecontrol(default_browser_cache_control);     registry.addresourcehandler("/plugin/**").addresourcelocations("/web-inf/plugin/").setcachecontrol(default_browser_cache_control);     registry.addresourcehandler("/**").addresourcelocations("/web-inf/root/").setcachecontrol(default_browser_cache_control);     // @formatter:on }; 

very surprisingly, when deploy app server , publish on tomcat, browser caches not work. exacy same image, response headers below

server: cache-control:no-cache, no-store, max-age=0, must-revalidate

localhost: cache-control:max-age=86400, public

how possible ? not have special configuration on tomcat.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -