I have an Applet which is loading images over a http connection using URLConnection. I am setting setUseCaches(true) for all connections, but still not seeing any caching behavi
The abstract class URLConnection provides set/getUseCaches methods, which can be used by any subclasses. As far as I've ever been able to determine, however, the HttpURLConnection class doesn't use those fields in any way. Setting the value to true or false won't have any different behavior.
If you want to add http cacheing behavior, you can either do it yourself (write your own, or extend HttpURLConnector; or use Sockets), or try using the If-Modified-Since and If-None-Match headers and look for a status code 304 (Not Modified). The second option is probably the easiest and will get you the best results.