[whatwg] Access the Response Headers for the Current Document
Adam de Boor
adeboor at google.com
Tue Jul 28 18:42:45 PDT 2009
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.
a
On Tue, Jul 28, 2009 at 6:21 PM, Ian Hickson <ian at hixie.ch> wrote:
> On Wed, 15 Jul 2009, Joseph Pecoraro wrote:
> >
> > It seems like an oversight that Javascript can read response headers off
> > of XHR but not for the current document. So in order to find out the
> > headers for the current document you would need to make another request,
> > refetching the current page, to find that out [1].
> >
> > Use Cases:
> > Any that apply to XHR accessing their response headers would certainly
> > apply here. Some thoughts are accessing the Content-Type header or
> > Custom Headers and acting accordingly.
>
> You can just include the data straight into the page, for now. It's really
> clear what the use cases would actually be in practice.
>
>
> > Come up with a clear description of the problem that needs to be solved:
> > Cannot access the Response Headers for the current document in
> > Javascript.
> >
> > Any there Browser Implementors out there that agree with this? If so,
> > any thoughts on the best ways to expose the current page's request
> > headers to Javascript? Certainly they are readonly, modifying them
> > seems to be useless. How about keeping consistent with the XHR interface
> > with something like:
> >
> > document.getAllResponseHeaders() and document.getResponseHeader(header)
>
> This is something that might make sense for a future version, but in the
> absence of a compelling need for this, I'm going to skip adding this in
> this version.
>
> Cheers,
> --
> Ian Hickson U+1047E )\._.,--....,'``. fL
> http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
> Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
>
--
Adam de Boor
Google
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090728/03ecf0b1/attachment-0002.htm>
More information about the whatwg
mailing list