Search code examples
htmlcssfirebugcdnamazon-cloudfront

Error referencing a stylesheet from a CDN (Amazon Cloudfront)


I added stylesheet in Amazon CDN server in folder css/index.css

and my CDN url is "http://d2e3gk0s3bhkk1.cloudfront.net"

but it does not activate stylesheet for class and id

it gives me error in Firebug that:

 The resource from this URL is not text: http://d2e3gk0s3bhkk1.cloudfront.net/css/index.css

Please help me

Thanks


Solution

  • Is this still a problem? The CSS file is OK because if you download it and use it from a local folder it works fine.

    I wonder if you've got the file properties set wrongly in Cloudfront? If you're using the console, right click on the file and look at Properties, then click on Metadata, and see what is listed under "ContentType".

    For a CSS file, you should see: Key: Content-Type Value:Text/Css If you see anything else, it's wrong - change it to Text/Css