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

CSS no longer returns compressed #460

Closed
traceypooh opened this issue Dec 9, 2022 · 10 comments
Closed

CSS no longer returns compressed #460

traceypooh opened this issue Dec 9, 2022 · 10 comments

Comments

@traceypooh
Copy link

I'm using a v99 self-hosted setup
(our Dockerfile https://git.archive.org/www/esm/-/blob/main/Dockerfile )

Our prior v77 version was doing brotli compression for CSS and JS files.
v99 still does this for JS files (yay) but not CSS files anymore, eg:
https://esm.archive.org/@internetarchive/[email protected]/BookReader/BookReader.css

Thanks for any help restoring this!

@ije
Copy link
Member

ije commented Dec 9, 2022

thanks I will look into it

@traceypooh
Copy link
Author

thanks! And FWIW my devops mate says same for imagery, too (eg: svg, gif..)

@ije
Copy link
Member

ije commented Dec 9, 2022

do you run the server behind a reverse proxy like Nginx?

@traceypooh
Copy link
Author

not really.
it runs under a nomad/consul cluster, w/ an haproxy load balancer in front of it.

@ije ije closed this as completed in 254319f Dec 9, 2022
@ije
Copy link
Member

ije commented Dec 9, 2022

Please try to use 254319f, i just fixed the compression problem of static content. Thanks!

@traceypooh
Copy link
Author

Thanks so much for the crazy fast reply and work!
Giving it a try now -- will report back and push to live if looks good...

@traceypooh
Copy link
Author

Verified getting CSS & JS replies w/ brotli again, thanks!
Pushed it live to our self-hosted system.

I haven't seen compression for imagery (png, svg) in various testing so far.

@ije
Copy link
Member

ije commented Dec 10, 2022

the server only compresses text file(js/css/svg/eg.) and the file size must be larger than 1024 bytes
the gzip/br can not reduce size too much of compressed file like image and mainly it costs lot of cpu both in server and client

@traceypooh
Copy link
Author

a perfect, that makes sense. verified a > 1k .svg is brotli compresses when asked via headers now, too, for our live self-hosted system.

thanks so much!

@traceypooh
Copy link
Author

ok, that makes sense, thanks. i added a CI/CD test to check brotli for a larger svg we had. thanks for the speedy work and replies!

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

No branches or pull requests

2 participants