I have a function that parses urls given to it, and based on the content it finds on that page it decides to use open graph to make embeded videos show up, just display the title, etc.
I want to extend it to detect if a direct video file or music file has been provided as a URL.
I have no interest at all to download the entire contents of the file, but I do want just the headers first to see if it’s an audio/mpg, text, html, etc.
Is there a way to get the http headers of a remote file/page without fetching all the content?
Using CFHTTP it will connect and give me the data I need, but it ties up processing time to download the rest of the content.
By knowing the header contents I can decide if I should try and download the entire page to parse it for the extra open graph data.
Try
<cfhttp>withmethod="head"http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7ffc.html