Project

General

Profile

Actions

Feature #90522

closed

Introduce AssetCollector

Added by Frank Nägler over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
Frontend
Target version:
-
Start date:
2020-02-24
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

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.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #92051: f:asset.script breaks ampersands and thus functionalityClosed2020-08-19

Actions
Related to TYPO3 Core - Task #101451: Remove unexplained reference to Wordpress documentationClosedChris Müller2023-07-26

Actions
Actions

Also available in: Atom PDF