XMLHttpRequest cannot load No 'Access-Control-Allow-Origin' header

Hello everyone

I working on a personal project accessing youtube API via javascript, and when I try to make a load request using jquery load function I get the following error:

XMLHttpRequest cannot load . No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘’ is therefore not allowed access.

I have looked this issue up online, and currently the most accepted solutions involve changing the header information to include ‘Access-Control-Allow-Origin’. But, since I do not have root access I was wondering how would I go about doing this???

I have already tried adding a .htaccess file to change the header information, this resulted in a 500 server error.

Note: If you need to see any code related to this issue please mention that. It may also be a syntax issue.

Any help would be most appreciated

Do you have an example of the code. I was working with an $ajax request the other day and got the EXACT same warning. Turns out I was using the wrong datatype and fixing that one problem allowed me to continue.

As bcaballero said, the source code would be useful. Also, search a bit more because the issue you’re having is related to CORS:

Also, read the error message you got:

Most likely your javascript is importing a library that requires to customize pieces and . Grep your code for those strings and put the appropriate values. Let us know how it goes.