Correct MIME Type for css.map files
Question:
looking for a bit of help that will most likely help other devs.
When serving files that are extension .css.map
what should their MIME type be?
This problem arose for me when serving files from s3 and in the upload process using boto3, one must set the MIME type for each files using the Python mimetypes library. However mimetypes
does not have all newer standards (i.e. ‘.scss’, ‘.svg’, ‘.js.map’). With that what is the appropriate MIME type for .css.map
files?
Answers:
.css.map
files should be application/json
As an educated guess, I will say that .css.map
files MIME type should be application/json
as determined from the .css.map
and .js.map
files being returned when navigating to http://getbootstrap.com/
The file is being served from http://getbootstrap.com/assets/css/docs.min.css.map
Question was asked a long time ago, but I was looking for the answer and discovered it should be
Content-type: application/octet-stream
I honestly just used curl to grab it from https://petstore.swagger.io/swagger-ui.css.map
looking for a bit of help that will most likely help other devs.
When serving files that are extension .css.map
what should their MIME type be?
This problem arose for me when serving files from s3 and in the upload process using boto3, one must set the MIME type for each files using the Python mimetypes library. However mimetypes
does not have all newer standards (i.e. ‘.scss’, ‘.svg’, ‘.js.map’). With that what is the appropriate MIME type for .css.map
files?
.css.map
files should be application/json
As an educated guess, I will say that .css.map
files MIME type should be application/json
as determined from the .css.map
and .js.map
files being returned when navigating to http://getbootstrap.com/
The file is being served from http://getbootstrap.com/assets/css/docs.min.css.map
Question was asked a long time ago, but I was looking for the answer and discovered it should be
Content-type: application/octet-stream
I honestly just used curl to grab it from https://petstore.swagger.io/swagger-ui.css.map