• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Caching in Tomcat 8

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tell me please. How to enable caching of files for tomcat 8? Faced the fact that the site is long loaded - squeezed css, js. It became easier, but Google advised to enable browser caching. I do not know how to do this on tomcat 8.

Thank you.
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Alex!

Tomcat does no caching - note that the advice was to enable browser caching. That is done in your HTML by writing the standard HTML cache headers as part of your output response stream.

There is one catch, however. Tomcat will remove cache-control headers from the output that is sent back if you are using secure transport (https). That is a security precaution to ensure that a previous request cannot plant a security "time bomb" in cached data that could exploit output of some other secured request.
reply
    Bookmark Topic Watch Topic
  • New Topic