-
Task
-
Resolution: Unresolved
-
Should have
-
None
-
None
-
Performance
-
- This ticket is about the master theme only.*
The frontend side does not currently require too much javascript, but maybe we can separate a few things and make sure to minify everything.
Determine which parts are required on the "critical path", any JS that is required for rendering or styling on first load (e.g.: the "blocks_wide" script).
Defer the loading of any parts that are not critical to the first render, for example the "load_more" script is not required for the "Load More" button to render correctly, so it can be loaded after render.
Create two entry points (I couldn't think of better names, sorry):
- criticalIndex
- deferrableIndex
If there is something very specific to a page (for example, the JS for the search results), create another entry point for that chunk only:
- searchResultsIndex?
- other?
Consider loading the non-critical resources by enqueueing the scripts with extra attributes as shown here:
https://wp-mix.com/defer-async-wordpress-enqueued-scripts/
- relates to
-
PLANET-6157 Split Cookies block JS/CSS code
- OPEN
-
PLANET-6158 Split SplitTwoColumns block JS/CSS code
- OPEN
-
PLANET-6159 Split Submenu block JS/CSS code
- OPEN
-
PLANET-6160 Split SocialMedia block JS/CSS code
- OPEN
-
PLANET-6161 Split Media block JS/CSS code
- OPEN
-
PLANET-4535 Split Timeline block JS code
- CLOSED
-
PLANET-6156 Split Spreadsheet block JS/CSS code
- CLOSED