Rate this page:
In Web Resource Manager (WRM) 5 and later versions, you can use four phases to specify at which point during the page lifecycle or should be loaded and executed.
|Execution order||Resource phase||Description|
|1||phase||Code is put inline and runs immediately when the browser parses the page. A product uses this phase to inject any bootstrap code.|
Code loads and runs immediately when the browser parses the or tag. Resources added this way are blocking the rendering.
|3||phase||Code loads asynchronously and runs in order when the page has finished parsing.|
|4||phase||Code loads and runs after the and phase scripts as well as (DCL) handlers have been completed.|
The and are two new phases we've introduced in WRM 5. They are used to minimize the initial load on a user’s browser when downloading, parsing, and executing all assets, which happens before the page content is rendered and the page becomes interactive.
Since WRM 5, you can also use new methods added to the WRM :
You can use these methods to define the loading phase for a requested , , , or .
Jira is the first product to use new APIs. For guidelines on how to update your app's code on Jira pages, check Preparing for Jira 9.0.
On updated pages that consume new WRM APIs, the phase might be a default phase for all the product code. This means that any app that relies on anything from the product must use the or later phase to work correctly on those pages.
To detect which pages are using deferred scripts and whether your app’s script is loaded in the phase, check tags. In the markup, they have an additional attribute (see the HTML specification for details).
Here's an example of a Jira page with the attribute:
<script src="/s/(...)/jira.general,-_super/batch.js" (...) defer></script>
Rate this page: