本文介绍了如何禁用小程序HTTP缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何禁用我的所有的HTTP连接的HTTP缓存在我JApplet的吗我不希望我的任何HTTP(请求/响应)在控制面板的用户设置cached.Regardless \\的java \\临时文件设置。 Applet的签订和java1.6编译。结果
我使用URLConnection.class和我的请求到第三方Web服务被缓存。结果
即:结果
我可以看到在Java高速缓存查看我的请求的URL。
结果
我也可以在应用程序数据\\阳光的回应....用户\\ \\ java的\\部署\\缓存结果
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&param2=2323232
Also i can find the responses in application ....users\data\sun\java\deployment\cache
responseline1
responseline2

推荐答案

您可以使用禁用缓存 URLConnection.setUseCaches(布尔)

这篇关于如何禁用小程序HTTP缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-24 23:19