Re: [XHR2] Avoiding charset dependencies on user settings

2011-09-30 Thread Henri Sivonen
On Thu, Sep 29, 2011 at 11:27 PM, Jonas Sicking jo...@sicking.cc wrote: Finally, XHR allows the programmer using XHR to override the MIME type, including the charset parameter, so if the person adding new XHR code can't change the encoding declarations on legacy data, (s)he can override the

Re: [XHR2] Avoiding charset dependencies on user settings

2011-09-29 Thread Henri Sivonen
On Thu, Sep 29, 2011 at 3:30 AM, Jonas Sicking jo...@sicking.cc wrote: Do we have any guesses or data as to what percentage of existing pages would parse correctly with the above suggestion? I don't have guesses or data, because I think the question is irrelevant. When XHR is used for

Re: [XHR2] Avoiding charset dependencies on user settings

2011-09-29 Thread Jonas Sicking
On Thu, Sep 29, 2011 at 12:03 AM, Henri Sivonen hsivo...@iki.fi wrote: On Thu, Sep 29, 2011 at 3:30 AM, Jonas Sicking jo...@sicking.cc wrote: Do we have any guesses or data as to what percentage of existing pages would parse correctly with the above suggestion? I don't have guesses or data,

Re: [XHR2] Avoiding charset dependencies on user settings

2011-09-28 Thread Anne van Kesteren
On Wed, 28 Sep 2011 03:16:46 +0200, Jonas Sicking jo...@sicking.cc wrote: So it sounds like your argument is that we should do meta prescan because we can do it without breaking any new ground. Not because it's better or was inherently safer before webkit tried it out. It does seem better to

Re: [XHR2] Avoiding charset dependencies on user settings

2011-09-28 Thread Henri Sivonen
On Wed, Sep 28, 2011 at 4:16 AM, Jonas Sicking jo...@sicking.cc wrote: So it sounds like your argument is that we should do meta prescan because we can do it without breaking any new ground. Not because it's better or was inherently safer before webkit tried it out. The outcome I am suggesting

Re: [XHR2] Avoiding charset dependencies on user settings

2011-09-28 Thread Jonas Sicking
On Tue, Sep 27, 2011 at 11:10 PM, Anne van Kesteren ann...@opera.com wrote: On Wed, 28 Sep 2011 03:16:46 +0200, Jonas Sicking jo...@sicking.cc wrote: So it sounds like your argument is that we should do meta prescan because we can do it without breaking any new ground. Not because it's better

Re: [XHR2] Avoiding charset dependencies on user settings

2011-09-28 Thread Jonas Sicking
On Wed, Sep 28, 2011 at 2:54 AM, Henri Sivonen hsivo...@iki.fi wrote: On Wed, Sep 28, 2011 at 4:16 AM, Jonas Sicking jo...@sicking.cc wrote: So it sounds like your argument is that we should do meta prescan because we can do it without breaking any new ground. Not because it's better or was

Re: [XHR2] Avoiding charset dependencies on user settings

2011-09-27 Thread Jonas Sicking
On Mon, Sep 26, 2011 at 7:50 AM, Henri Sivonen hsivo...@iki.fi wrote: On Mon, Sep 26, 2011 at 12:46 PM, Jonas Sicking jo...@sicking.cc wrote: On Fri, Sep 23, 2011 at 1:26 AM, Henri Sivonen hsivo...@iki.fi wrote: On Thu, Sep 22, 2011 at 9:54 PM, Jonas Sicking jo...@sicking.cc wrote: I agree

Re: [XHR2] Avoiding charset dependencies on user settings

2011-09-26 Thread Jonas Sicking
On Fri, Sep 23, 2011 at 1:26 AM, Henri Sivonen hsivo...@iki.fi wrote: On Thu, Sep 22, 2011 at 9:54 PM, Jonas Sicking jo...@sicking.cc wrote: I agree that there are no legacy requirements on XHR here, however I don't think that that is the only thing that we should look at. We should also look

Re: [XHR2] Avoiding charset dependencies on user settings

2011-09-26 Thread Jonas Sicking
On Fri, Sep 23, 2011 at 4:46 AM, Henri Sivonen hsivo...@iki.fi wrote: On Fri, Sep 23, 2011 at 11:26 AM, Henri Sivonen hsivo...@iki.fi wrote: Applying all the legacy text/html craziness Furthermore, applying full legacy text/html craziness involves parser restarts for GET requests. With a

Re: [XHR2] Avoiding charset dependencies on user settings

2011-09-26 Thread Henri Sivonen
On Mon, Sep 26, 2011 at 12:46 PM, Jonas Sicking jo...@sicking.cc wrote: On Fri, Sep 23, 2011 at 1:26 AM, Henri Sivonen hsivo...@iki.fi wrote: On Thu, Sep 22, 2011 at 9:54 PM, Jonas Sicking jo...@sicking.cc wrote: I agree that there are no legacy requirements on XHR here, however I don't think

Re: [XHR2] Avoiding charset dependencies on user settings

2011-09-23 Thread Henri Sivonen
On Thu, Sep 22, 2011 at 9:54 PM, Jonas Sicking jo...@sicking.cc wrote: I agree that there are no legacy requirements on XHR here, however I don't think that that is the only thing that we should look at. We should also look at what makes the feature the most useful. A extreme counter-example

Re: [XHR2] Avoiding charset dependencies on user settings

2011-09-23 Thread Henri Sivonen
On Fri, Sep 23, 2011 at 11:26 AM, Henri Sivonen hsivo...@iki.fi wrote: Applying all the legacy text/html craziness Furthermore, applying full legacy text/html craziness involves parser restarts for GET requests. With a browsing context, that means renavigation, but I really don't want to support

Re: [XHR2] Avoiding charset dependencies on user settings

2011-09-23 Thread Boris Zbarsky
On 9/23/11 4:26 AM, Henri Sivonen wrote: Applying all the legacy text/html craziness to XHR could break current use of XHR to retrieve responseText of text/html resources (assuming that we want responseText for text/html work like responseText for XML in the sense that the same character

[XHR2] Avoiding charset dependencies on user settings

2011-09-22 Thread Henri Sivonen
http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#document-response-entity-body says: If final MIME type is text/html let document be Document object that represents the response entity body parsed following the rules set forth in the HTML specification for an HTML parser with scripting disabled.

Re: [XHR2] Avoiding charset dependencies on user settings

2011-09-22 Thread Jonas Sicking
On Thu, Sep 22, 2011 at 6:33 AM, Henri Sivonen hsivo...@iki.fi wrote: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#document-response-entity-body says: If final MIME type is text/html let document be Document object that represents the response entity body parsed following the rules set