如何禁用小程序中的http缓存 [英] How to disable http caching in applet
问题描述
如何禁用 japplet 中所有 http 连接的 http 缓存?我不希望缓存任何 http(请求/响应).无论控制面板中的用户设置如何\java\临时文件设置.小程序是用java1.6签名和编译的.
我正在使用 URLConnection.class 并且正在缓存我对第 3 方 Web 服务的请求.
即:
我可以在 Java Cache Viewer 中看到我的请求 url.http://www.service.com?param1=232¶m2=2323232
我也可以在应用程序中找到响应....users\data\sun\java\deployment\cache
responseline1
responseline2
How can i disable http caching of all my http connections in my japplet? I dont want any of my http (request/response)to be cached.Regardless of the user settings in control panel\java\Temporary File Settings. Applet is signed and compiled with java1.6.
I am using URLConnection.class and my request to an 3rd party web service is being cached.
ie:
I can see my request url in Java Cache Viewer.
http://www.service.com?param1=232¶m2=2323232
Also i can find the responses in application ....users\data\sun\java\deployment\cache
responseline1
responseline2
推荐答案
您可以使用 URLConnection.setUseCaches(boolean)
这篇关于如何禁用小程序中的http缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!