This would allow for better front-end performance. The first response (HTML) would then include aggregates. SPF responses would not include aggregates. Fewer requests for the first page load.
Necessary for this to work: ability of the name attribute to accept multiple values.
Example
Today, if the first page needs 3 JS files, and the second page needs 2 (of which one already exists on the first), that means 3 requests on the first page, 1 on the second. Wouldn't it be much better if those 3 requests (really, N requests) could be 1 request?
This would allow for better front-end performance. The first response (HTML) would then include aggregates. SPF responses would not include aggregates. Fewer requests for the first page load.
Necessary for this to work: ability of the
name
attribute to accept multiple values.Example
Today, if the first page needs 3 JS files, and the second page needs 2 (of which one already exists on the first), that means 3 requests on the first page, 1 on the second. Wouldn't it be much better if those 3 requests (really, N requests) could be 1 request?
In other words, this would allow:
Rather than requiring:
Existing logic
Test coverage should be added at https://github.com/youtube/spfjs/blob/cf4b0f499f174052003bce1a86ccb388a54cdbe1/src/client/nav/response_test.js — which also happens to show that this is not supported today.