Skip to content
Snippets Groups Projects
Commit 7e342e74 authored by Benni Mack's avatar Benni Mack Committed by Susanne Moog
Browse files

[FEATURE] Introduce AssetCollector

AssetCollector is a concept to allow custom CSS/JS code,
inline or external, to be added multiple times in e.g. a Fluid
template (via <f:script> or <f:css> ViewHelpers) and only be
added once.

It considers best practices by having a "priority" flag to be either
be moved in the <head> area (for CSS useful in above-the-fold concepts)
or at the bottom of the <body> tag contents.

AssetCollector helps to work with content elements as components,
reducing effectively the amount of CSS to be loaded and also incorporates
the HTTP/2 power where it is not relevant to have all files compressed
and concatenated in one file (although this could be added later-on).

AssetCollector is implemented as singleton and should slowly replace
the various existing options in TypoScript which seem to be confusing.

AssetCollector also collects information about "imagesOnPage"
effectively taking off pressure from PageRenderer and TSFE to
store common data in FE - as this is now handled in AssetCollector,
which can be used in cached and non-cached components.

Resolves: #90522
Releases: master
Change-Id: I6ce8141ad8891a7a8ee6d4f8a7377d93a894c3b8
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63327


Tested-by: default avatarDaniel Goerz <daniel.goerz@posteo.de>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarKevin Appelt <kevin.appelt@icloud.com>
Tested-by: default avatarDaniel Gohlke <daniel.gohlke@extco.de>
Tested-by: default avatarSusanne Moog <look@susi.dev>
Reviewed-by: default avatarDaniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarKevin Appelt <kevin.appelt@icloud.com>
Reviewed-by: default avatarDaniel Gohlke <daniel.gohlke@extco.de>
Reviewed-by: default avatarSusanne Moog <look@susi.dev>
parent 6db9a9dc
No related merge requests found
Showing
with 1302 additions and 17 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment