2

is it possible to use XHR to get only the file's headers without downloading the file itself?

Nirlah
  • 345
  • 2
  • 16
  • 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 Answers1

4

You can use the http HEAD method instead of GET method.

xhr.open("HEAD", url, async)
Bart
  • 26,399
  • 1
  • 23
  • 24