I have an iframe in my JQuery code like this:
var iframe = $('<iframe height="500px">');
        iframe.attr('src', 'someUrl');
which I execute within a function after a condition is met, and it is working as expected. In the url I am also generating and adding some headers to the response which I can see in the network tab of chrome. I would like to access those headers if possible (AJAX call is not an option as this url produces pdf which I am displaying in an iframe within a div). By following this post I tried:
var iframe = $('<iframe height="500px">');
        iframe.attr('src', 'someUrl');
console.log(iframe.contents().find("someHeader").html());
which results in undefined. How can I access those response headers which I can see in the browser's inspection?
 
    