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

prefer Gzip to Deflate #13633

Merged
merged 1 commit into from Nov 25, 2018
Merged

prefer Gzip to Deflate #13633

merged 1 commit into from Nov 25, 2018

Conversation

Findus23
Copy link
Member

@Findus23 Findus23 commented Oct 20, 2018

Hi,

This is a really minor fix I found when taking a closer look at the js/tracker.php.

While gzip isn't smaller (in fact it is deflate with a better error checking and therefore is even 18 bytes larger), nearly every website nowadays uses gzip and I think it would be worth it to by default use the established and more robust compression method and only use deflate as a fallback (that would probably never occur as every browser suports gzip).
Only disadvantage would be that it is a tiny bit slower, but as it is cached it shouldn't matter.

Maybe we could also support brotli, even though it would require manually pre-compressing the file.
But I expected a bit more improvement (both with -9)

-rw-r--r--  1 lukas lukas    65458 Okt 20 20:41  piwik.js
-rw-r--r--  1 lukas lukas    21280 Okt 20 20:41  piwik.js.br
-rw-r--r--  1 lukas lukas    22312 Okt 20 20:41  piwik.js.gz

@Findus23 Findus23 added the Needs Review PRs that need a code review label Oct 21, 2018
@sgiehl sgiehl added this to the 3.8.0 milestone Nov 25, 2018
@sgiehl sgiehl merged commit 105fc3f into 3.x-dev Nov 25, 2018
@sgiehl sgiehl deleted the prefer-gzip branch November 25, 2018 13:59
@Findus23 Findus23 restored the prefer-gzip branch October 4, 2019 09:49
@sgiehl sgiehl deleted the prefer-gzip branch February 10, 2020 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants