Add an Expires or a Cache-Control header in JSP

前端 未结 4 859
别跟我提以往
别跟我提以往 2020-11-30 22:08

How do you add an Expires or a Cache-Control header in JSP? I want to add a far-future expiration date in an include page for my static components

4条回答
  •  一整个雨季
    2020-11-30 22:46

    Servlet containers like Tomcat come with a set of predefined filters. See for example Expires Filter. It may be easier to use existing one than to create your own similar filter.

提交回复
热议问题