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

Brotli compression too slow on some files (1 minute+), need to overwrite staticCompressionLevel in Web.config #16

Open
baselsalam opened this issue May 28, 2019 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@baselsalam
Copy link

How do we configure overwrite the staticCompressionLevel in Web.config?
The compression level by default is the slowest one, and on some files it takes more than a minute!

@Phoenix359
Copy link
Contributor

I had (somewhat) the opposite issue. I wanted static file to be compressed (1 time) as much as possible and then to be served from the server cache. I could not get the last part to work probably because i had cache busting query strings attached to the requests making IIS think its dynamic content.

Until we can set these compressionLevels (don't know if that is possible with extensions) you can either do the same as i did:

I now partially solved this issue by pre-compressing (Gzip & Brotli) all my static files on build with some Gulp tasks and use the nuget package CompressedStaticFiles to serve these pre-compressed static files. These files are probably not served from server cache but i can leverage Azure CDN for that.

Or try to make sure the static compressed files are added to the server cache by setting something like this in the web.config
<httpCompression staticCompressionIgnoreHitFrequency="true">
Maybe the extension IISManager can be of use here?

Or use Azure CDN to serve your static files.

@shibayan shibayan added the help wanted Extra attention is needed label Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants