Codeberg/pages-server
25
366
Fork
You've already forked pages-server
52

Enable text compressions for Codeberg Pages #223

Closed
opened 2023年05月16日 22:10:26 +02:00 by rohandebsarkar · 7 comments

Since Codeberg Pages only hosts static pages, I was wondering if gzip or brotli compressions could be enabled?

Since Codeberg Pages only hosts static pages, I was wondering if gzip or brotli compressions could be enabled?

I vote for gzip as well.

If there are concerns about potential server hit and increased resource usage for compression on the fly, pre-compressed gzip files might be a good alternative (like educate users how to use gzip or zopfli on private computers, through documentation). Pre-compressed Brotli content might be even better.

I vote for gzip as well. If there are concerns about potential server hit and increased resource usage for compression on the fly, pre-compressed gzip files might be a good alternative (like educate users how to use `gzip` or `zopfli` on private computers, through documentation). Pre-compressed Brotli content might be even better.

Upvote for this issue! The alternative mentioned by @durad is also awesome, too! Also, upvote for the alternative!

Upvote for this issue! The alternative mentioned by @durad is also awesome, too! Also, upvote for the alternative!

Also want this in my website too

Also want this in my website too

It would be nice if codeberg pages supported these features just like nginx.

gzip_static on;
brotli_static on;

So users can pre compress their site at the highest compression level thus making it easier for Codeberg to host.

It would be nice if codeberg pages supported these features just like nginx. ``` gzip_static on; brotli_static on; ``` So users can pre compress their site at the highest compression level thus making it easier for Codeberg to host.

Hi! I would be happy to test pre-compressing brotli on-device, before pushing to the repo. How can I do this?

Also, I did not know that enabling compression on the server would increase the load. By how much? Is it that significant?

Hi! I would be happy to test pre-compressing brotli on-device, before pushing to the repo. How can I do this? Also, I did not know that enabling compression on the server would increase the load. By how much? Is it that significant?
Contributor
Copy link

FWIW, #387 added the ability to pre-compress files and covers most of the use cases for this. It supports the three main formats browsers support: gzip, brotli, and zstd. It's not live on codeberg.page yet since I believe there would have to be a release to do that.

Not sure whether we'd ever want to support "automatic" compression, though. It feels like it would have to involve some kind of more-permanent caching of the compressed versions for performance, since a static site only needs to compress its assets once.

Figure that the maintainers can decide whether this counts as "solved" or not.

FWIW, #387 added the ability to pre-compress files and covers most of the use cases for this. It supports the three main formats browsers support: gzip, brotli, and zstd. It's not live on codeberg.page yet since I believe there would have to be a release to do that. Not sure whether we'd ever want to support "automatic" compression, though. It feels like it would have to involve some kind of more-permanent caching of the compressed versions for performance, since a static site only needs to compress its assets once. Figure that the maintainers can decide whether this counts as "solved" or not.

That solution is very inconvenient

That solution is very inconvenient
Sign in to join this conversation.
No Branch/Tag specified
main
renovate/woodpeckerci-plugin-docker-buildx-6.x
renovate/golang-deps-non-major
git-pages-server-doc
pages
ci_user-local-acme-service
feat/redis-caching
fix/memory-problem
v6.4
v6.3
v6.2.1
v6.2
v6.1
v6.0
v5.1
v5.0
v4.6.3
v4.6.2
v4.6.1
v4.6
v4.5
v4.4
v4.3
v4.2
v4.1
v4.0
v3.2.1
v3.2
v0.3.1
v0.3.0
v0.2.2
v0.2.1
v3.1
v3.0a
v3.0
v2.5b
v2.5a
v2.5
v2.4
v2.3
v2.2
v2.1
v2.0
v1.0_php
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
8 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Codeberg/pages-server#223
Reference in a new issue
Codeberg/pages-server
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?