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

node adaptor does not serve contents with any compression #345

Closed
samccone opened this issue Jan 24, 2021 · 4 comments · Fixed by #367
Closed

node adaptor does not serve contents with any compression #345

samccone opened this issue Jan 24, 2021 · 4 comments · Fixed by #367

Comments

@samccone
Copy link
Contributor

samccone commented Jan 24, 2021

By default the node adaptor should compress responses, right now it does not. Compared to sapper this is a regression.

@benmccann
Copy link
Member

brotli might be better yet

@samccone samccone changed the title node adaptor does not gzip content node adaptor does not serve contents with any compression Jan 25, 2021
@benmccann
Copy link
Member

benmccann commented Feb 6, 2021

When I run npm run start I also see that all my static assets are being served via http/1.1. http/2 would be preferred though may be difficult to use since it requires https private key and cert. Maybe it's just easier to leave it as http/1.1 for now and do http/2 to the load balancer

@benmccann
Copy link
Member

benmccann commented Feb 6, 2021

Sapper used Polka/Express. There's half a dozen open PRs there for brotli support: https://github.com/expressjs/compression/pulls?q=brotli+is%3Apr+is%3Aopen+. We might have to wait on that and just do gzip for now

Though Kit uses the built-in Node server. But I'm not sure if we should stick with it since we'd need to figure out how to cache the response after compressing it. https://nodejs.org/api/zlib.html#zlib_compressing_http_requests_and_responses

@GrygrFlzr
Copy link
Member

If it's switched to using Express/Polka, should the adapter name be changed to match? It could reduce confusion with regards to required runtime dependencies of the adapted output.

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 a pull request may close this issue.

3 participants