Optimize Total Blocking Time (TBT) for Shopify Speed Optimization
Total Blocking Time (TBT) is a crucial performance metric in
Google Core Web Vitals, measuring the time a page remains unresponsive due to heavy JavaScript execution.
A high TBT can slow down page interactivity, leading to a poor user experience and lower SEO rankings.
Learn more:
How to Reduce Total Blocking Time (TBT) in Shopify
1. Apply Async & Defer for JavaScript Execution
Instead of loading all JavaScript files simultaneously, use the async or defer attributes to optimize script loading:
- Async → Loads scripts without blocking page rendering.
- Defer → Loads scripts after the HTML parsing is complete.
Example:
<!-- Defer Attribute -->
<head>
<script type="text/javascript" src="theme.js"defer/>
</head>
<!-- Async Attribute -->
<head>
<script type="text/javascript" src="theme.js"async/>
</head>
2. Delete Unused JavaScript & App Code
Many Shopify themes retain leftover JavaScript from uninstalled apps, increasing page load time. Regular cleanup helps reduce TBT.
- Open Google Chrome DevTools → Coverage tab to identify unused scripts.
- Remove leftover app scripts from your theme.liquid file and layout includes.
3. Replace Large JavaScript Libraries with Smaller Alternatives
Heavy JavaScript libraries like jQuery can slow down execution. Replace them with modern, lightweight alternatives.
- Avoid using heavy libraries like jQuery if possible.
- Choose lightweight frameworks like Alpine.js or Vanilla JS.
- Use CDN-hosted JavaScript to reduce your server load.
4. Reduce Third-Party JavaScript Load
Third-party scripts — such as tracking codes, live chat widgets, or social media integrations —
can significantly impact loading performance by blocking rendering.
- Load all third-party scripts asynchronously to prevent them from delaying page rendering.
- Use Google Tag Manager (GTM) to organize and manage tracking scripts efficiently.
- Audit and remove any unnecessary third-party apps or scripts that add extra load time.
5. Key Takeaways for Shopify Speed Optimization
- Optimize and minimize JavaScript execution to enhance interactivity.
- Use Async and Defer attributes for non-critical scripts.
- Identify and remove unused JavaScript or old app-related scripts.
- Replace heavy JavaScript libraries with lightweight alternatives where possible.
- Manage and optimize all tracking and third-party scripts through Google Tag Manager.
9. High-Priority Code Optimization
- Remove commented HTML, unused CSS & JS from old apps.
- Eliminate render-blocking resources (move critical CSS above the fold).
- Load JS only on necessary pages using conditional logic.
- Replace heavy third-party JS (like jQuery) with lightweight JavaScript.
- Keep Shopify theme JS under 16KB for better performance.
- Consider implementing PWA (Progressive Web App) for a faster experience.
10. Weekly Shopify Store Health Check
- Google Analytics → Track response & load times.
- Google Search Console → Monitor Core Web Vitals (3-month history).
- Maintain performance logs → Record JS, CSS, and image payload changes.
- Track app installs/uninstalls → Prevent unnecessary code bloat.
6. Reduce Third-Party Code Impact & JavaScript Execution Time
- Load third-party scripts using async or defer to prevent blocking.
- Google Tag Manager (GTM) to manage and delay non-critical scripts.
- Remove unused app scripts from theme.liquid and assets.
- Minify JavaScript and replace heavy libraries like jQuery with lightweight alternatives.
- Choose code splitting to load JavaScript only when needed.
7. Optimize Largest Contentful Paint (LCP)
- Apply WebP images instead of PNG/JPEG for faster loading.
- Enable lazy loading for images.
- Eliminate render-blocking resources by preloading important CSS & fonts.
- Use a fast Shopify theme like Dawn, Turbo, or Prestige.
8. Optimize First Contentful Paint FCP
- Prioritize loading above-the-fold content first.
- Reduce server response time by optimizing Liquid code.
- Ensure text remains visible during web fonts load.
- Ensure Optimize store images. load via Shopify’s CDN.
11. Simplify Your Homepage for Better Speed & UX
- Focus on essential content – Highlight key products, offers, and announcements.
- Use trust indicators – Add testimonials, reviews, and brand logos.
- Ensure mobile responsiveness – Optimize layout for all devices.
- Include strong CTAs – Feature New Arrivals, Best Sellers, and Promotions.
A clean, well-structured homepage boosts engagement, trust, and conversions ?
12. Minify Webpage
13. Optimize Image Loading with Lazy Loading
Shopify automatically compresses images, but lazy loading ensures faster page speed. Instead of loading all images at once, images will only load as the user scrolls.
- Reduces initial page load time
- Improves performance & user experience
- Optimizes bandwidth usage
Example: If your page has 100+ images, lazy loading will load only the visible ones, enhancing speed & efficiency ?
14. Reduce Unnecessary HTTP Requests
Too many HTTP requests slow down your Shopify store. Optimize by:
- Combining & inlining CSS to reduce external file requests
- Inlining small JavaScript snippets instead of external files
- Deferring low-priority JavaScript (load on scroll instead of page load)
- Using Base64 for small images to reduce separate requests
- Limiting social buttons to avoid extra external requests
Fewer requests = Faster page load & better user experience ?
For more information please visit
https://www.oscprofessionals.com/blog/how-to-make-fewer-http-requests-to-speed-up-your-site/
15. JavaScript, CSS Performance Optimization:
- Some apps will come with CSS, JS.
- As an expert you need to identify how some of the CSS, JS of an app can be removed.
- Always beware of excessive liquid loops.
List of Opportunities Audit Tool :
List down all opportunities link them to a specific blog as for those opportunities.
Conclusion
Applying these optimization techniques consistently will improve your Shopify store’s speed and performance. This guide is based on real-world experience and practical implementation.
Many developers overlook speed optimization when working on themes, but keeping speed in mind ensures better Web Vitals scores and an enhanced user experience.
By following these steps, your site will load faster, rank higher, and convert better.


















