How to enable browser caching of static content(images, css, js) with Tomcat? Preferable solution will be editingspring MVC config files or web.xml
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
If Spring 3.0 is being used,
<mvc:resources>
is one way to implement caching of static resources. This link has some documentation.try (with changing the values)
You can also use an interceptor:
See the MVC docs
For those who use Java configuration, you can manage caching parameters using
ResourceHandlerRegistry
, there is example how do I set up different caching preferences for different content types: