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 more GZIP compressable MIME types #5992

Closed
RehanSaeed opened this issue Dec 2, 2016 · 9 comments
Closed

Add more GZIP compressable MIME types #5992

RehanSaeed opened this issue Dec 2, 2016 · 9 comments
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware

Comments

@RehanSaeed
Copy link
Contributor

I raised the following PR aspnet/BasicMiddleware#181 (comment). This is a justifications for each MIME type to be added:

  • application/rss+xml, application/atom+xml and image/svg+xml These are all just special dialects of XML, they are all web related and are fairly common (especially SVG).
  • application/vnd.ms-fontobject, application/x-font-ttf, font/otf - TrueType fonts (ttf) and OpenType fonts (otf) can be safely be compressed for smaller size. The answer is unclear when it comes to Embedded OpenType (eot) fonts. It’s possible to compress EOT font files as part of the file creation process, in which case gzipping them is unnecessary. However, to generate compressed EOT font files requires a special tool and an extra step, so it’s likely that most of them are not pre-compressed. However, Google recommends compressing EOT fonts.
  • image/x-icon - Finding references for this is more difficult and I can only provide my own anecdotal evidence and the fact that the HTML 5 Boilerplate Server Configs project also includes it for NGINX and IIS.

I only added the most used MIME types, this list could double in size if you wanted to support all web formats.

@Tratcher
Copy link
Member

Tratcher commented Dec 9, 2016

@glennc

@glennc
Copy link
Contributor

glennc commented Feb 9, 2017

Adding to 2.0 to prototype API changes for adding/removing mimetypes then re-evaluating this based on easier usage instead of modifying defaults.

@glennc glennc self-assigned this Feb 9, 2017
@muratg
Copy link
Contributor

muratg commented May 15, 2017

@glennc Do you have any prototype API surface that you'd like to make adding/removing mimetypes easy?

@glennc
Copy link
Contributor

glennc commented May 15, 2017

I did have, but that was a long time ago. Let me go see.

@glennc
Copy link
Contributor

glennc commented Jun 22, 2017

At this point I don't think we will get to this one in 2.0. Moving to the punt bucket, if there is time we can look at it. But more likely it will slip to a later release.

@muratg
Copy link
Contributor

muratg commented Jun 23, 2017

@glennc move the milestone as well?

@muratg muratg assigned shirhatti and unassigned glennc Oct 16, 2018
@muratg
Copy link
Contributor

muratg commented Oct 16, 2018

Triage:

  1. Verify if the extensibility points are sufficient, so folks can add any MIME type they care about
  2. Create a blessed list of MIME types and include them by default. The blessed list will be only what we use in Templates

@muratg
Copy link
Contributor

muratg commented Oct 22, 2018

@shirhatti I'm assuming you'll move this to 3.0?

@aspnet-hello aspnet-hello transferred this issue from aspnet/BasicMiddleware Dec 19, 2018
@aspnet-hello aspnet-hello assigned shirhatti and unassigned shirhatti Dec 19, 2018
@aspnet-hello aspnet-hello added this to the 3.0.0 milestone Dec 19, 2018
@shirhatti
Copy link
Contributor

Spent some time re-visiting compression. As mentioned in triage, the extensibility points we are sufficient.
We will not be adding any new MIME types by default that aren't assets shipped by the templates.

@shirhatti shirhatti removed this from the 3.0.0 milestone Jan 16, 2019
@shirhatti shirhatti removed their assignment Jan 16, 2019
@dotnet dotnet locked as resolved and limited conversation to collaborators Dec 4, 2019
@amcasey amcasey added area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware and removed area-runtime labels Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware
Projects
None yet
Development

No branches or pull requests

8 participants