Re: XHR: responseText encoding detection

On 2/26/07 3:21 PM, "Anne van Kesteren" <annevk@opera.com> wrote:

>> In my testing, I have found that existing implementations already deduce
>> the charset for XHR response in a way that's drastically different from
>> normal page loading.
> 
> But should we really make it be like that? Once HTML5 is there we probably
> want .responseXML to work for text/html documents as well and we probably
> want the encoding to be derived the same way HTML5 specifies it should be
> derived.

  It turned out that there is already some code (Dashboard widgets) that
relies on Http-Equiv METAs being honored by XMLHttpRequest. This worked in
shipping Safari/WebKit by accident: all XHR content was passed through an
XML/HTML decoder.

  So, it seems that we need to decode text/html according to its normal
rules. This can be made a quirk for Dashboard, but since it makes long-term
sense for HTML5, maybe it is a good behavior to specify.

  For most browsers, it would be a change in behavior, so I guess the
biggest question is what other browser makers think about it.

- WBR, Alexey Proskuryakov

Received on Wednesday, 30 May 2007 07:44:56 UTC