Sometimes, it is useful to get the last modified and expiration date of web content. Following code does exactly that.

Java Code:
	URL u = new URL("http://www.cricinfo.com");
        URLConnection uc = u.openConnection( );

        System.out.println("Last modified: " + new Date(uc.getLastModified( )));
        System.out.println("Expiration date: " + new Date(uc.getExpiration( )));