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
context should be loaded and executed.
|Execution order||Resource phase||Description|
|1||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
|3||Code loads asynchronously and runs in order when the page has finished parsing.|
|4||Code loads and runs after the |
interaction 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
Both methods accept a new
ResourcePhase parameter that defines the existing WRM resource phases.
You can use these methods to define the loading phase for a requested
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
defer 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
defer 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
defer phase, check
<script> tags. In the markup, they have an additional
defer attribute (see the HTML specification for details).
Here's an example of a Jira page with the
<script src="/s/(...)/jira.general,-_super/batch.js" (...) defer></script>
init.code in the
interactionphase or lazy-load it.
Rate this page: