Browser does not load CSS with "Access-Control-Allow-Origin: *"
I am trying to load CSS and Javascript file from cross origin. I also set the header Access-Control-Allow-Origin: *
in the response, but the browser does not download the files, I download the CSS using the code below:
var fileref = document.createElement("link");
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", filename);
document.getElementsByTagName("head")[0].appendChild(fileref);
I want to download css and js using a http connection to be uploaded to https: // [site]
+3
source to share