selectivizr icon indicating copy to clipboard operation
selectivizr copied to clipboard

Allow use of different-domain CSS with XDomainRequest

Open adammessinger opened this issue 12 years ago • 2 comments

I can't use Selectivizr on my current project because the CSS files are hosted on a subdomain. The script could check to see if a stylesheet's href is on the same domain, and if not use XDomainRequest instead of XMLHttpRequest.

I believe this only works on IE8 or higher, and requires the Access-Control-Allow-Origin header on the server with the CSS file be set to permit the request. Those seem like reasonable implementation trade-offs for this functionality, however.

adammessinger avatar Feb 28 '12 22:02 adammessinger

+1

ITspirit avatar Sep 17 '14 11:09 ITspirit

I started to work on that. From what I see, selectivzr is only working in synchronous mode, and for XDomainRequeset we need asynchronous. Do you know it there is a way to make selectivizr use the asynchronous mode ?

Hugues-Antoine avatar Oct 13 '14 16:10 Hugues-Antoine