[OSM-dev] cross-domain xmlhttprequest

Tom Hughes tom at compton.nu
Tue Dec 22 11:27:37 GMT 2009


On 22/12/09 11:08, Stephan Plepelits wrote:

> I just ran into a problem ... I'd like to access OpenStreetMap data
> directly from a web application via a XMLHttpRequest. Unfortunately
> cross-domain XMLHttpRequests are not allowed unless the foreign web server
> replies with a special HTTP-header (Access-Control-Allow-Origin) and you
> are using a modern browser (e.g. Firefox>=3).
>
> Here you can find some documentation:
>    http://www.w3.org/TR/access-control/
>
> This is the needed HTTP-header-line:
> Access-Control-Allow-Origin: *
> (this would allow XMLHttpRequests from any client web browser)

My understanding was that the XHR cross domain stuff had been abandoned? 
is that spec still valid and likely to be widely implemented? or is it a 
dead end?

Tom

-- 
Tom Hughes (tom at compton.nu)
http://www.compton.nu/




More information about the dev mailing list