I need to determine the mime-type of certain files that get returned from the service, I do not know their file extensions or what their type is before hand, basically we retrieve documents from the API like such: "http://site.com/getFile/BFD843DFLKXJDF" where the random text at the end is some file.
<input type="button" value="Click Me" onClick="alert(document.getElementById('iframeID').contentDocument.contentType);">
<iframe id="iframeID" src="http://site.com/getFile/BFD843DFLKXJDF" width="600" height="600" />
This works in Firefox, it returns in the alert dialog: "application/pdf" for pdf files. However Internet Explorer is the main browser I need to target, "contentDocument" is not defined (apparently I use just "document" instead), but "contentType" is also undefined and I don't know what the IE equivalent would be (google searches have not yielded any results).
Help is greatly appreciated, thanks.