想知道 uf JSP 页面是否会被缓存?

发布于 2024-12-11 04:36:29 字数 47 浏览 0 评论 0原文

使用jsp生成动态页面。想知道jsp是否会被缓存?我没有使用任何过期或缓存控制。

Use jsp to generate dynamic page. wondering of jsp will ever be cached or not? I am not using any expires or cache-control.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

天煞孤星 2024-12-18 04:36:29

我认为@BalusC指的是获取一个嗅探器并捕获对服务器上的jsp页面的请求,您可以获取firefox的附加组件http headers live,一旦安装了插件,就可以通过 firefox 打开插件==>;工具==>实时 HTTP 标头,我在这里打印了一个示例捕获,这些标头很容易阅读。还有很多其他工具可以做类似的事情。

         http://www.jsptut.com/Further.jsp

         //Request header
         GET /Further.jsp HTTP/1.1
         Host: www.jsptut.com
         User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
         Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
         Accept-Language: en-us,en;q=0.5
         Accept-Encoding: gzip, deflate
         Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
         Keep-Alive: 115
         Connection: keep-alive
         Referer: http://www.jsptut.com/
         Cookie: JSESSIONID=ds43d6a9a50050pqfv61h
         Cache-Control: max-age=0

         //Response Header from server
         HTTP/1.1 200 OK
         Server: Blazix Java Server 1.2
         Date: Thu, 20 Oct 2011 17:49:30 GMT
         Content-Type: text/html
         Transfer-Encoding: chunked
         Via: 1.1 xx.xx.xx:80 
         Connection: keep-alive

I think what @BalusC is referring to is get a sniffer and capture your the request to your jsp page on your server, You can get a add on to fire fox http headers live, once you install add on then open the add on by going fire fox ==> Tools ==> Live HTTP Headers, I printed an example capture here and these headers are easy to read. There are lot of other tools that do some thing similar.

         http://www.jsptut.com/Further.jsp

         //Request header
         GET /Further.jsp HTTP/1.1
         Host: www.jsptut.com
         User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
         Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
         Accept-Language: en-us,en;q=0.5
         Accept-Encoding: gzip, deflate
         Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
         Keep-Alive: 115
         Connection: keep-alive
         Referer: http://www.jsptut.com/
         Cookie: JSESSIONID=ds43d6a9a50050pqfv61h
         Cache-Control: max-age=0

         //Response Header from server
         HTTP/1.1 200 OK
         Server: Blazix Java Server 1.2
         Date: Thu, 20 Oct 2011 17:49:30 GMT
         Content-Type: text/html
         Transfer-Encoding: chunked
         Via: 1.1 xx.xx.xx:80 
         Connection: keep-alive
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文