Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am storing my css and javascript files on blobs in the azure. I need to read the cssRules using javascript, but the cssRules field is null.

However, when the css file is a part of the project, it successfully reads the css, and the cssRules field is not null.

How do I fix this problem? I want to store the files in blobs.

share|improve this question
 
you can't read the cssRules of a cross domain css file. The stylesheet must be hosted on the same domain. –  Esailija Oct 24 '12 at 11:47
 
Is there any way I can allow it to read the cssRules? Since I'm using the Azure, I need to deploy a new version for every change I make (each deployment takes 30 minutes). –  user1016313 Oct 24 '12 at 11:58
 
What about using @import. Would that work? –  user1016313 Oct 24 '12 at 11:59
 
Only the foreign server can allow it (otherwise there would be no point in same-origin policy) by sending proper CORS headers . Unfortunately it seems azure blob does not support it –  Esailija Oct 24 '12 at 12:02
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.