This tip shows how to check if a file was modified on the server!

 URL u =null;
long timestamp = 0;
getImage(getDocumentBase(), "test.gif");

try {

     u = new URL(getDocumentBase(), "test.gif");
     URLConnection uc = u.openConnection();
     uc.setUseCaches(false);

     /*
     ** use timestamp has a reference, re-open an URLConnection
     ** to the same file to check if the timestamp is different
     ** with the getLastModified() method.
     */
     timestamp = uc.getLastModified();
     
} 
catch (Exception e) {
   e.printStackTrace();}
}