Nirlah
Nirlah

Reputation: 373

XHR request only headers

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

Upvotes: 2

Views: 1423

Answers (1)

Bart
Bart

Reputation: 27205

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

xhr.open("HEAD", url, async)

Upvotes: 4

Related Questions