URLConnection: setUseCaches(boolean usecaches)
import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; public class MainClass { public static void main(String[] args) { URL u; URLConnection uc; try { u = new URL("http://www.java2s.com"); try { uc = u.openConnection(); if (uc.getUseCaches()) { uc.setUseCaches(false); } } catch (IOException e) { System.err.println(e); } } catch (MalformedURLException e) { System.err.println(e); } } }