javascript - No 'Access-Control-Allow-Origin' header is present Error on a few clients -
javascript - No 'Access-Control-Allow-Origin' header is present Error on a few clients -
i receive
no 'access-control-allow-origin' header nowadays error
from background-script of chrome-addon. :
var trophynames; var file="http://www.example.com/js/trophy."+request.language+".json"; $.ajax({ url: file, datatype: 'json', async: false, success: function(data) { trophynames=data; } });
the funny thing is: this appears on (at least) one client, not on all. assume error gets or noone. clue why might client-specific?
the not-working-client has same browser (chrome, of course) , same settings (synched local chrome browser)
the .htaccess is:
<filesmatch "\.(json)$"> <ifmodule mod_headers.c> header add together access-control-allow-origin "*" header add together access-control-allow-headers "origin, x-requested-with, content-type" header add together access-control-allow-methods "put, get, post, delete, options" </ifmodule> </filesmatch>
please note: not duplicate of "standard" cors-problems posted here @ so, because want know can cause different behaviours on different clients.
javascript google-chrome cors
Comments
Post a Comment