codemonkey1988/script-style-push

TYPO3 Extension to push javascript and css files over a http/2 connection.

Installs: 7 569

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 3

Open Issues: 2

Type:typo3-cms-extension

2.3.2 2020-05-14 17:11 UTC

README

TYPO3 Extension to push JavaScript and CSS files over a HTTP/2 connection. The CSS and JavaScript files are automatically parsed from rendered html.

This extension does not push images automatically, because of huge traffic overload when using responsive images. Each image in the picture source would be pushed to the client.

Installation

composer require codemonkey1988/script-style-push

Configuration

To support your used CSS and JavaScript files, you just need to install this extension. The extension will automatically push every CSS and JavaScript file found in the html response.

You can add custom resources to push. Just add a comma separated list of asset paths to the site configuration. Just add a comma separated list of assets. Keep in mind, that this might change in the future as TYPO3 supports additional custom field types for site configuration.

Prevent asset over-pushing

This extension help you preventing over-pushing of assets by setting a session cookie that contains all assets that were pushing during the user session. This extension will not push an asset, if it's in the cookie. This feature can be disabled in extension settings.

Disabling this extension

If you need to disable generating the Link header, you can do this by setting the env variable SCRIPT_STYLE_PUSH_DISABLED to 1.