I understand that you can set HTTP request headers very easily when making AJAX calls in JavaScript.
However is it also possible to set custom HTTP request headers when inserting an iframe into a page via script?
<iframe src="someURL"> <!-- is there any place to set headers in this? -->
No, you can’t. However you could set the
iframesource to some kind of preload script, which uses AJAX to fetch the actual page with all the headers you want.