Re: [XHR2] responseText for text/html before the encoding has stabilized

On Fri, Sep 30, 2011 at 12:11 PM, Anne van Kesteren <> wrote:
> On Fri, 30 Sep 2011 19:26:48 +0200, Jonas Sicking <> wrote:
>> Hmm.. I looked through archives but can't find any such decision.
>> It's not how Gecko works, but I haven't tried webkit.

That email does not seem to mention how to determine encoding at all,
so I still wouldn't say that that's something "we" decided on as much
as what "you" decided :-)

But yes, I do now see that the spec draft defines how to do it here:
which is great.

I do however think that steps 4 and 5 should only be done when
.responseType is "" or "document". Especially for HTML it seems like
it would require hairy HTML parsing, including in workers.

Also, it doesn't seem to work for things like "chunked-text" since it
could require switching encoding part-way through, which means that
"text" and "chunked-text" would be decoded differently, which I think
would be very surprising.

> Kind of weird that Gecko does not work this way since this is exactly what
> the standard defines. Then again, you often seem to ask questions already
> answered in the standard...

Would you rather write specs without implementation feedback? I would
imagine no.

/ Jonas

Received on Friday, 30 September 2011 19:42:36 UTC