How do I access a page\'s HTTP response headers via JavaScript?
Related to this question, which was modified to ask about accessing two specific HTTP headers.
<
Allain Lalonde's link made my day.
Just adding some simple working html code here.
Works with any reasonable browser since ages plus IE9+ and Presto-Opera 12.
(XHR) Show all response headers
All Response Headers with XHR
Note: You get headers of a second request, the result may differ from the initial request.
fetch()
API
fetch() all Response Headers
All Response Headers with fetch()