CSS failing to apply from S3 hosted files (uploaded with transmit)

Posted by Matt Bryson on 26-May-2015 12:14:33
Find me on:

Had a very odd issue with CSS files being loaded, but the css not being applied (and any @imports not loading either).

Turns out that one of our devs was uploading files using Panic Tansmit. It appears that this sets the content-type header on S3 files to binary/octect stream by default. Thus when served from S3 the browser doesn't know what to do with it.

The fix was to add a custom default header rule into transmit to ensure it saved CSS as CSS, go to...

Transmit > Preferences > Cloud

Add a new extension for css, and choose content-type from the drop down list of headers. Then set text/css as the value.

Screen Shot 2015-05-26 at 12.10.24



What is odd, is that we all use Transmit, but it was only this one guy with the issue. We all had the same version, and the same OSX build. Very odd, but this solved it.

m

Topics: CSS, AWS, S3

About the author

Matt Bryson is an experienced systems engineer with over 15 years Development and Systems Operations experience.

NEW - Free eBook

Transforming your eDetail process. Click below to download the eBook.

New Call-to-action

Subscribe to Email Updates

Recent Posts