I need read to read remote content. I read that should be send header Access-Control-Allow-Origin. I did that but still get this error. Here is script code
$.ajax({
url:'http://bbc.co.uk',
headers: {'Access-Control-Allow-Origin': '*'},
success:function(json){
// do stuff with json (in this case an array)
alert("Success");
},
error:function(){
alert("Error");
}
});
I see Access-Control-Allow-Origin in the sent headers. What is wrong?