Review main Merged Breaking

91378[!!!][TASK] Remove FE & BE HTTP response compression

Christian Kuhn CR +2 V +2 Hard +60 −209 updated 06/18/26, 23:10

Commit message

When `$GLOBALS['TYPO3_CONF_VARS']['BE']['compressionLevel']` or
`$GLOBALS['TYPO3_CONF_VARS']['FE']['compressionLevel']` are set
to a value between 1 and 9 (default 0), they enable gzip
compression of the HTTP application resonse in a BE or FE
middleware.

The patch removes this feature: It stems back to a time
where web servers didn't usally do that on their own and
applications had to take care. It is nowadays largely
unused in application layers since web servers are the
better place to apply HTTP compression and can use
improved compression standards like brotli or zStandard.

The FE implementation used a custom class to handle the
compression which is removed with the patch. In the backend,
the OutputCompression middleware was the sole use of toggle
`$GLOBALS['TYPO3_CONF_VARS']['BE']['compressionLevel']`, and
thus removed as well.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Georg Ringer +1
    • Markus Klein +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Georg Ringer +1
    • Markus Klein +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 12

Review log 2126

Show 1 earlier messages
  1. Christian Kuhn uploaded patch set 1 10/30/25, 21:21

  1. core-ci voted on patch set 1 V +1 10/30/25, 21:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88196

  2. Christian Kuhn uploaded patch set 2 V +1 10/30/25, 21:44

  3. core-ci voted on patch set 2 V +1 10/30/25, 21:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88198

  4. Christian Kuhn uploaded patch set 3 V +1 10/30/25, 22:09

  5. Christian Kuhn uploaded patch set 4 10/30/25, 22:13

  6. core-ci voted on patch set 3 V +1 10/30/25, 22:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88199

  7. core-ci voted on patch set 4 V +1 10/30/25, 22:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88200

  8. Christian Kuhn uploaded patch set 5 V +1 10/31/25, 00:01

  9. core-ci voted on patch set 5 V +1 10/31/25, 00:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/88204

  10. Josef Glatz commented on patch set 5 10/31/25, 04:35

    ### some thoughts on the rSt adding some helpful links or some basic examples for commen webservers would be helpful? especially in shared hosting envs where such stuff needs to be configured if ever possible 100% perfect as in a vhost config? having some info about configuring compression would be nice.

    root-htaccess:31

    what about removing all relevant surrounding lines too?
  11. Benjamin Franzke commented on patch set 5 10/31/25, 05:19

    Breaking-107943-FrontendAndBackendHTTPResponseCompressionRemoved.rst:49

    Shouldn't we also remove the resource handling? This would at least match the argument that web servers are used to apply compression anyway and otherwise users of this setting would end up with a mixed scenario when upgrading to v14: PHP served frontend requests are no longer compressed, but resources are. Did you find blockers for removing resource compression as well? I understand that you probably need this gone in the output postprocessing for some TSFE improvements, but I think we should try to have a consistent behavior regarding `$GLOBALS['TYPO3_CONF_VARS']['FE']['compressionLevel']` and not only remove *some* parts of it, because it is a blocker for refactorings. ;)
  12. Christian Kuhn commented on patch set 5 10/31/25, 10:22

    Breaking-107943-FrontendAndBackendHTTPResponseCompressionRemoved.rst:49 Reply

    I'm talking with benni, helmut and Markus Klein about ResourceCompressor. There is no full consensus yet, for instance it can still be useful to pre-compress assets. It seems we reached consensus on https://review.typo3.org/c/Packages/TYPO3.CMS/+/91379 which I pushed already.

    root-htaccess:31 Reply

    i wanted to keep changes on that file relatively small with this change and hope that's fine.
  13. Markus Klein commented on patch set 5 10/31/25, 10:57

    I think we could extract this functionality into an extension? So, if someone really needs compression on the PHP side can simply use that extension then.
  14. Markus Klein commented on patch set 5 10/31/25, 11:02

    Breaking-107943-FrontendAndBackendHTTPResponseCompressionRemoved.rst:49 Reply

    It is way more efficient to compress static resources upfront than leaving this to the webserver doing it for every request. Serving static files "as is" is highly optimized with memory mapping and stuff inside the webserver. Therefore I'd suggest even the opposite: to create more compressed variants of assets (gz, brotli, etc.) to serve them even more efficiently. I see no consistency problem with having HTML-output of PHP being non-compressed, while assets being compressed.
  15. Christian Kuhn commented on patch set 5 10/31/25, 15:08

    Reply

    yeah. should be possible: put the middlewares into some extension, register in stacks and be done. i suppose the community could easily come up with something in case someone really still needs this. not a core contributor job, though (read: i'll personally not do nor maintain that).
  16. Christian Kuhn commented on patch set 5 10/31/25, 16:50

    Breaking-107943-FrontendAndBackendHTTPResponseCompressionRemoved.rst:49 Reply

    i think this has been answered: dealing with ResourceCompressor is a different thing and can happen with separate patches. i hope it is ok to mark resolved here.

    root-htaccess:31 Reply

    i hope its ok to mark resolved here: improvements of this file could be done with separate patches.
  17. Christian Kuhn commented on patch set 5 10/31/25, 16:59

    Reply

    i'd argue server administration and configuration is not our direct problem domain: developers & agencies & admins should have this level of knowledge, should be able to search for details depending on their environment, or should be able to ask server maintainer for help. if they configured compressionLevel before, they should know what they are doing anyway. we added some kickstart information mentioning the involved HTTP headers already, i thin that is more than enough. in short: no, i don't think we should communicate web server configuration knowledge like that and not in this document.
  18. Markus Klein voted on patch set 5 CR +1 V +1 10/31/25, 17:26

  19. Stefan Bürk voted on patch set 5 CR +1 10/31/25, 17:30

  20. Georg Ringer voted on patch set 5 CR +1 V +1 10/31/25, 17:58

  21. Stefan Bürk voted on patch set 5 V +1 10/31/25, 17:58

  22. Christian Kuhn voted on patch set 5 CR +2 V +2 10/31/25, 18:27

  23. Christian Kuhn merged patch set 6 10/31/25, 18:27

  24. Lina Wolf commented on patch set 6 11/01/25, 10:06

  25. Lina Wolf commented on patch set 6 11/02/25, 05:51

    Reply Unresolved

    The documentation for frontend compression in DefaultConfigurationDescription.yaml also needs to be changed accordingly: https://review.typo3.org/c/Packages/TYPO3.CMS/+/91401