I'm making a cross domain request in an html file for an xml file using XMLHttpRequest.
I want to use the PI <?access-control allow="requestingdomain.com"?>
as outlined here http://www.w3.org/TR/2005/NOTE-access-control-20050613/
in the requested xml file, rather than getting into setting headers.
However it see开发者_如何学Cms to have no effect, I still can not retrieve the xml document(using firefox 3.6.15 at least).
Is this not implemented, and there's no getting around having to set Access-Control-Allow-Origin headers etc? Or am I missing something.
thank you
here the right code
<?php header('Access-Control-Allow-Origin: http://requestingdomain.com'); ?>
more details https://developer.mozilla.org/En/Server-Side_Access_Control
精彩评论