简体   繁体   English

如何在不添加缓存头的情况下缓存服务器响应中发送的图像?

[英]How to cache images sent in server response without adding caching headers?

I'm a complete noob to caching and to top it off, for reasons beyond my control, I cannot add/modify my response header sent from my servlet (ridiculous I know). 我是一个完全不懂缓存的人,并且由于无法控制的原因,我无法添加/修改从Servlet发送的响应头(我知道这很荒谬)。 Is there any other way I can tell the user's browser to cache the images similar to a typical Last-Modified or Expires header? 还有什么其他方法可以告诉用户浏览器来缓存与典型的Last-Modified或Expires标头类似的图像吗? I've heard of ways of doing it in jquery but all I've seen is jquery image pre-loading which isn't the same thing. 我听说过在jquery中执行此操作的方法,但是我所看到的只是jquery图像的预加载,这不是同一回事。

更改了我从新的servlet进行调用的请求,以便可以修改/添加标头,从而绕过了我遇到的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM