HTTP缓存头设置weblogic [英] HTTP caching headers settings weblogic
问题描述
有人知道如何修改weblogic设置以将HTTP缓存标头设置为较远的日期吗?
Does anyone know how to modify weblogic settings to set the HTTP cache header to a far future date?
例如,在我当前的设置中,weblogic将http缓存标头设置为在5小时后过期(作为HTTP/1.1 304未修改的响应).
For example in my current setup weblogic sets the http cache headers to expire in 5 hours (as a response of HTTP/1.1 304 Not Modified).
这是.gif文件上的缓存标头值...日期:星期二,2010年3月16日20:39:13 GMT.
This is the cache header value on a .gif file ... Date: Tue, 16 Mar 2010 20:39:13 GMT.
我已重新检查,并且总是5个小时.我必须可以调整某些设置以进行更改.
I have re-checked and it's always 5 hours. There must be some for of settings that I can tweak to change it.
感谢您的宝贵时间!
推荐答案
静态内容由weblogic.servlet.FileServlet
提供,所有Web应用程序均具有
Static content is served by a weblogic.servlet.FileServlet
that all web applications have by default but I couldn't find any way to configure HTTP headers. So either replace this servlet with your own servlet or use a Filter
.
但是上面的评论是正确的,使用Web服务器提供静态内容是正确的方式:Web服务器在此方面做得更好,而应用程序服务器除提供静态文件外还有其他事情要做.
But the above comment is right, using a web server to serve static content is the "right" way to go: a web server does a better job at this and the application server has other things to do than serving static files.
这篇关于HTTP缓存头设置weblogic的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!