[FEATURE] Add event to allow manage $resources. #30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
hi
I have an edge case that I do not need all resources produced by TYPO3 to have http2 header and the current way the
b13/http2
works is that it adds all resources to http2.Below there is real example of this edge case.
An external TYPO3 extension is adding a JS which is not needed at first loading because user will first need to give cookie consent before using this JS. Therefore there is no need to load this JS file early with http2. In fact there is even no need to load it at once with async because it will be never used without cookie consent. We want to load this JS when some JS condition is meet
hasAcceptedCookieConsent()
So what we would need is only a url of JS asset that can be used later in JS to load this extension JS. To achieve this an assets is declared with some special type - for example like
text/html/consent
.The JS declaration described above could have following declaration:
and inline JS in like that:
Unfortunately with current
b31/http2
behaviourmodalbox.js
is added to early link download and downloaded even if it is not needed.