#typo3

There are many HTML compression extensions for TYPO3 in the TER. Many of them aren't maintained anymore or just have a huge overhead, you will mostly not need for anything. So why not build a content compression by your own?

It's pretty easy to implement. Basically it just require the use of two Hooks from tslib/class.tslib_fe.php. The Hooks are called contentPostProc-all and contentPostProc-output. The first one handles normal pages with cached output, the second one does the same, just for uncached pages with COA or USER_INT objects. This Hooks will be bind to a class and function of your choice in ext_localconf.php of your extension.

Sometimes you want to generate TYPO3 internal URIs programmatically. Now you could try to create the URL manually on your own, or use the UriBuilder class. This handy tool is pretty neat to create any kind of internal URI. In a controller this class is available by $this->getControllerContext()->getUriBuilder(). If you want to use the UriBuilder somewhere else, you need to load an instance of the class by the ObjectManager.

When you have access to an instance of the builder, it's pretty straight forward from now on. The class has a bunch of simple setters, to control the generation of the URI. Best practice is to reset all the options of the builder on start of every new URI creation.

I'm pretty sure that many people search for this thing already. So did I. It took me quite a lot time to figure out, how to overwrite the default template in TYPO3 8.7. This layout comes with some annoying wrappings, like the new frames. So you may want to remove them too. When you know how, it's really easy to do. Just add a small part to your TypoScript setup.