Check for MIME type using HEAD request before downloading the entire thing