LeaVerou / prefixfree

Break free from CSS prefix hell!
http://projects.verou.me/prefixfree/
MIT License
3.82k stars 713 forks source link

Deal with external CSS files that are under a different domain #191

Open Piedone opened 10 years ago

Piedone commented 10 years ago

Currently if a CSS file comes from an external domain (e.g. a cookie-less domain) Prefixfree fails because of the same-origin policy prevents the XMLHttpRequest from being executed. This is normal, however the error is not very apparent (I didn't see any error in Firebug, just noticed the error being thrown in Chrome's dev tool - then was it that I digged into the code of Prefixfree to see how it works and why it fails), it could be somehow more visible (so e.g. it's also obvious from looking at the developer console).

Ideally Prefixfree would also help with CSS files under a different domain - but I don't know whether this is possible with the security limitations (apart from making the remote server return and appropriate Access-Control-Allow-Origin header).