How can I control what does and doesn't get cached by an applet? Additionally, any insights into how caching works within an applet would be most appreciated.
I'm making a simple request in an applet to try and test if resources loaded at runtime are cached anywhere.
Here's the code that makes the request. I call this several times in a row, all within the same applet lifecycle:
URL url = new URL("http", "localhost", 8343, "/spring-social-test/testSession.html");
URLConnection connection = url.openConnection();
connection.setDefaultUseCaches(true);
connection.connect();
But here's what is output in the Java applet plugin console:
network: Cache entry not found [url: http://localhost:8343/spring-social-test/index.html, version: null]
network: Connecting http://localhost:8343/spring-social-test/index.html with proxy=DIRECT
Update
Just to be clear - I need to know under what circumstances things (images) will get cached, as I'm working on a browser-based game prototype wherein my main cost will be bandwidth. I need to know exactly how much bandwidth I'll be using in order to explore business models.