Discussion Forums
Discussion Forums > Category: Storage > Forum: Amazon Simple Storage Service (S3) >Thread: CSS File alternates being served as text/css binary/octet
Advanced search options
CSS File alternates being served as text/css binary/octet
Posted by: drbigfresh
Posted on: Jun 12, 2012 11:49 PM
  Click to reply to this thread Reply
This question is not answered. Answer it to earn points.
I have an s3 bucket (containing a css file) , cdn-ified with CloudFront, which seems to alternate when requested by the browser (periodically) as text/css or binary/octet. At this point I've tried everything to make it stay consistently text/css, but it will won't render as css 50% of the time, Chrome will render no styles and gives me this error in the console:
'Resource interpreted as Stylesheet but transferred with MIME type binary/octet-stream:'

I've double checked the program I uploaded it with. I've checked the mime-type on the s3 website, and even reset it there. It's always shown as being correct. I've tried renaming/deleting the file. I've tried expiring it. I think at this point I've tried everything I can think of and still can't get it to work at any sort of acceptable rate. Am I missing something, or is there something I've overlooked in trying to get it to work?
Permlink Replies: 1 | Pages: 1 - Last Post: Jun 13, 2012 2:14 AM by: IP
Replies
Re: CSS File alternates being served as text/css binary/octet
Posted by: IP
Posted on: Jun 13, 2012 2:14 AM
in response to: drbigfresh in response to: drbigfresh
  Click to reply to this thread Reply
Hi drbigfresh,

The most possible reason is that some CloudFront servers cached the previous version of your CSS which did not have 'text/css' content type for some reason.
You might need to issue a Cloudront Invalidation of the file to force CF servers to update their caches.

Note, that invalidation can take some time to clean up all edge locations. If it won't help, please provide the HTTP response headers

Sincerely,
IP