I got this error expecting $.ajax()
to work in my contentScript
XMLHttpRequest cannot load http://example.com/tab/index.php. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'chrome-extension://gncbffieahbpgabchdjmhipkmahk****' is therefore not allowed access.
This is how the ajax look like in my contentscript.js
$.ajax({type: "GET",url: "http://example.com/tab/index.php", success: function(data){
alert(data);
}});
and in my http://example.com/tab/index.html I already declared
header('Access-Control-Allow-Origin: *');
Any idea why it still doesn't work?