Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add application/json to gzip types, mjs MIME type update #130

Merged
merged 2 commits into from
May 27, 2021

Conversation

adamduncan
Copy link
Collaborator

@adamduncan adamduncan commented May 26, 2021

Following on from #104, it would be great if we could gzip application/json files. We'll have a few static JSON assets (search indices, etc.) which would benefit a lot from compression.

@djgalloway is this fair game/all we need to include?

Related, we currently have text/javascript included in our gzip types, but we set the .mjs MIME type to application/javascript. Based on a little digging, I've also updated this to text/javascript to ensure they're gzipped as intended. Shout if this isn't in line with your expectations.

@adamduncan adamduncan requested a review from djgalloway May 26, 2021 18:50
@adamduncan adamduncan changed the title Add application/json to gzip types Add application/json to gzip types, mjs MIME type update May 26, 2021
@djgalloway
Copy link
Contributor

From this comment:

I was told that text/javascript is obsolete and it should be application/javascript

I feel like I remember that from adjusting this setting on another one of my public sites. docs.ceph.com maybe? Anyway, I just checked out this branch and pushed the changes to nginx. If it looks right to you (i.e., no errors), I'm fine with it.

@adamduncan
Copy link
Collaborator Author

adamduncan commented May 27, 2021

If it looks right to you (i.e., no errors), I'm fine with it.

Cool, thanks for following up @djgalloway. Yep, sounds like there's been some ambiguity around this MIME type, but happy to go with the spec (and can't see it throwing up any issues with JS sources). Thanks.

@djgalloway djgalloway merged commit a6011bb into develop May 27, 2021
@djgalloway djgalloway deleted the feature/gzip-json branch May 27, 2021 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants