Reputation: 7080
I want to set this expiration for weblogic, here is the description:
http://developer.yahoo.com/performance/rules.html#expires
http://code.google.com/speed/page-speed/docs/caching.html
I see a lot of examples how to do it in Apache using .htaccess file but I don't see examples for weblogic.
Can someone please provide an example how to set expiration of static content far in advance?
Upvotes: 0
Views: 2504
Reputation: 31371
Weblogic does not have a config file to do this. You'll have to do this in your JSP code (all of them using Pragma HTTP Headers) or using a Filter for all static files such as CSS and images.
There is a good example in BalusC's answer to this question
Add an Expires or a Cache-Control header in JSP
Specifically
httpResponse.setDateHeader("Expires", System.currentTimeMillis() + 604800000L); // 1 week in future.
Upvotes: 2