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

Static Gzip support for the r2 webserver #173

Open
trufae opened this issue Sep 28, 2020 · 0 comments
Open

Static Gzip support for the r2 webserver #173

trufae opened this issue Sep 28, 2020 · 0 comments

Comments

@trufae
Copy link

trufae commented Sep 28, 2020

Describe the issue

Just using the tiled webui as an example.

  • source = 26KB
  • compiled = 24KB
  • gzipped = 7KB

By supporting early gzip support in the http webserver we may solve the following two issues:

  • git grep wont be spotting things in precompiled files
  • faster loading times and smaller files to ship

Possible fix

When the client requests a file from the server. the server may check if a file appending .gz exists. if so, just download it and add the compression header: Content-Encoding: gzip.

As long as this is a non-standard behaviour. it wont work with other webservers on top of r2. So it will probably need to be implemented in different ways for them or just drop both files (js and .js.gz), but that wont be an improvement at all

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

1 participant