Giter Club home page Giter Club logo

http2's Introduction

HTTP/2 Pre-Fetch for TYPO3

Latest Version on Packagist Software License Build Status

This TYPO3 extension fetches all CSS and JS resources that are used for a page-rendering and sends additional HTTP/2 Headers "Link" for each resource resulting in a faster first contentful paint for TYPO3 CMS.

This extension currently runs on TYPO3 v7, TYPO3 v8, TYPO3 v9, TYPO3 v10 and TYPO3 v11, and needs PHP 7.0 or higher.

Installation

Just use composer req b13/http2 and install the extension via the Extension Manager, flush caches and you're ready to go.

In order to see if the extension works, ensure that your webserver supports HTTP/2, runs via HTTPS and check your Response headers to see if "link: " headers are added to your HTTP response.

Nothing to configure, it just works(tm).

Requirements

You need a webserver with HTTP/2 support, and - of course - HTTPS.

Also, use PHP7 - if you care about performance or supported PHP versions, there is nothing to discuss.

How it works under the hood

  1. Hook into the "PageRenderer" API class by fetching the concatenated CSS / JS files, and libraries.
  2. If in FE, this is stored within TSFE together with cached data (could be run twice here for non-cached info)
  3. Send to the client via header() - in BE directly or in FE at the end of the request via a PSR-15 middleware (TYPO3 v10+ only).

ToDo

  • Implement options to also allow to define other resources (fonts/images), e.g. via TypoScript.
  • Use proper DTOs instead of arrays.

Credits

License

As this is a PHP project, extending TYPO3, all code is licensed as GPL v2+.

Sharing our expertise

Find more TYPO3 extensions we have developed that help us deliver value in client projects. As part of the way we work, we focus on testing and best practices to ensure long-term performance, reliability, and results in all our code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.