is it possible to use XHR to get only the file's headers without downloading the file itself?
Asked
Active
Viewed 1,383 times
2
-
Not an exact duplicate, but the same answer: http://stackoverflow.com/questions/333634/http-head-request-in-javascript-ajax – G-Nugget Apr 09 '13 at 20:40
1 Answers
4
You can use the http HEAD method instead of GET method.
xhr.open("HEAD", url, async)

Bart
- 26,399
- 1
- 23
- 24