W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2011

[whatwg] Server-Sent Events and CORS

From: Tomi <bosak.tomas@gmail.com>
Date: Mon, 5 Sep 2011 11:38:11 +0200
Message-ID: <CAB8ucr3q0m3PCPHwSWyeFwb0N8E1G3BCmq8FFs0mx-N_yLQhXw@mail.gmail.com>
So if the current SSE specification is implemented by the browser
vendors, CORS enabled url resource in EventSource should work? Even
Opera is going to support CORS in general (as far as I know Opera
doesn't support this specification at the moment)? I'm asking because
Opera also support SSEs and CORS would probably be high in demand with
this specification I guess.

On 5 September 2011 10:44, Anne van Kesteren <annevk at opera.com> wrote:
> On Mon, 05 Sep 2011 10:42:07 +0200, Tomi <bosak.tomas at gmail.com> wrote:
>>
>> I was recently doing some experiments with Server-Sent Events
>> technology and come to an issue when EventSource url resource is from
>> a different origin (in my case different subdomain). When this happens
>> Chrome 13 gives this:
>>
>> Uncaught Error: SECURITY_ERR: DOM Exception 18
>>
>> and Firefox 6 this:
>>
>> Firefox can't establish a connection to the server at ...url...
>>
>> In my case requested EventSource url resource is using CORS specific
>> Access-Control-Allow-Origin header, but this doesn't help. So here
>> comes my question: does Server-Sent Events EventSource meant to
>> support CORS enabled url resource or this is a problem of browser
>> vendors (or maybe some other problem which I'm not aware of). Thanks
>> for your time and help.
>
> Chrome implements an older version of the specification that had the wrong
> error handling. Soon browsers will handle CORS here though.
>
>
> --
> Anne van Kesteren
> http://annevankesteren.nl/
>
Received on Monday, 5 September 2011 02:38:11 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:36 UTC