The “Resource Loader Script” setting can be found under the JavaScript menu in your NitroPack dashboard.
Here’s what you need to know and how to leverage this feature.
What Does This Setting Do?
Unlike other tools that use built-in browser techniques, NitroPack uses a proprietary resource loading mechanism. This unique approach optimizes how resources are fed to the main thread, ensuring a more efficient and balanced loading process for improved website performance.
Change the Resource Loading Strategy Manually
NitroPack allows users to manually configure their resource loading strategy based on their site’s needs. The two available options are:
Load Styles First (Default) – Prioritizes CSS loading to ensure that the page structure and styles are displayed as early as possible.
Load Scripts First – Prioritizes JavaScript execution before styles.
Since scripts are render-blocking, loading styles first is the preferred and recommended setting. This ensures that the visual elements of your website appear as quickly as possible, providing a better user experience while maintaining optimal performance.
Important: After changing your settings, make sure to click “Save” and purge your cache.
How NitroPack's Resource Loading Mechanism Boosts Performance
NitroPack’s proprietary resource loader significantly enhances website speed and stability by improving key performance metrics:
1. Faster Page Speed: By efficiently rearranging resource loading, NitroPack minimizes delays and speeds up page rendering. Critical resources are loaded in an optimized sequence to prevent bottlenecks.
2. Reduced Main Thread Work: NitroPack ensures that the main thread is not overloaded with inefficient resource processing. This leads to smoother interactions and a more responsive user experience.
3. Improved Core Web Vitals: NitroPack’s resource loading mechanism positively impacts:
Largest Contentful Paint (LCP) – By prioritizing styles, the largest visible element appears faster.
Cumulative Layout Shift (CLS) – Prevents sudden layout shifts caused by late-loading styles.
Interaction to Next Paint (INP) – Reduces resource congestion, ensuring smooth and responsive interactions.
📌 If you need any assistance or have questions, you can contact our Support team using the chat bubble on the bottom right of this page.