one of the biggest use cases is for an app to understand whether its pages are coming through a proxy. in theory this shouldn't be necessary, but in practice it sometimes is. perhaps not a large enough use case to justify adding the capability to the spec.<div>
<br></div><div>a<br><br><div class="gmail_quote">On Tue, Jul 28, 2009 at 6:21 PM, Ian Hickson <span dir="ltr"><<a href="mailto:ian@hixie.ch">ian@hixie.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Wed, 15 Jul 2009, Joseph Pecoraro wrote:<br>
><br>
> It seems like an oversight that Javascript can read response headers off<br>
> of XHR but not for the current document. So in order to find out the<br>
> headers for the current document you would need to make another request,<br>
> refetching the current page, to find that out [1].<br>
><br>
> Use Cases:<br>
> Any that apply to XHR accessing their response headers would certainly<br>
> apply here. Some thoughts are accessing the Content-Type header or<br>
> Custom Headers and acting accordingly.<br>
<br>
</div>You can just include the data straight into the page, for now. It's really<br>
clear what the use cases would actually be in practice.<br>
<div class="im"><br>
<br>
> Come up with a clear description of the problem that needs to be solved:<br>
> Cannot access the Response Headers for the current document in<br>
> Javascript.<br>
><br>
> Any there Browser Implementors out there that agree with this? If so,<br>
> any thoughts on the best ways to expose the current page's request<br>
> headers to Javascript? Certainly they are readonly, modifying them<br>
> seems to be useless. How about keeping consistent with the XHR interface<br>
> with something like:<br>
><br>
> document.getAllResponseHeaders() and document.getResponseHeader(header)<br>
<br>
</div>This is something that might make sense for a future version, but in the<br>
absence of a compelling need for this, I'm going to skip adding this in<br>
this version.<br>
<br>
Cheers,<br>
<font color="#888888">--<br>
Ian Hickson U+1047E )\._.,--....,'``. fL<br>
<a href="http://ln.hixie.ch/" target="_blank">http://ln.hixie.ch/</a> U+263A /, _.. \ _\ ;`._ ,.<br>
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Adam de Boor<br><br>Google<br>
</div>