This guide is for Shopify store owners who lose sales to slow pages. You get five theme and app settings that shape your store’s speed, with safe code and clear steps for each one. Speed matters because research shows that a one-second delay in page load time can reduce conversions by 7% and customer satisfaction by 16%.

None of these settings are secret. They live in your theme code, your app list and your Shopify admin. Most stores set them once at launch and never look again, and that is often what separates a store that converts from one that frustrates shoppers.

Each section covers one setting: what it does, what to change and how to check the result. If you would rather not edit code, see the 15+ speed optimizations WebBoost applies automatically after you add one line of code.

Performance Lab · Slow Website Cost Seven Percent Revenue Loss

What poor Shopify speed costs your store

Before you change anything, it helps to know what a slow store costs you.

Revenue impact of slow Shopify stores

Slow pages cost you sales now and search visibility later:

Lost conversions right away

According to recent e-commerce studies:

  • A 100ms delay in load time reduces conversion rates by 7%
  • 40% of visitors abandon sites that take more than 3 seconds to load
  • 79% of shoppers who experience performance issues are less likely to purchase again

For a Shopify store earning $10,000 a month, these numbers mean:

  • $700 lost monthly from just a 100ms slowdown
  • $4,000+ lost monthly if your store takes over 3 seconds to load
  • Thousands more lost in lifetime customer value from decreased repeat purchases

Long-term SEO costs

Google’s Core Web Vitals (LCP, INP and CLS) are ranking factors, so slow stores can lose visibility:

  • Sites that pass Core Web Vitals can get a ranking advantage
  • Google ranks the mobile version of your store, so mobile performance counts most
  • Poor performance metrics can undercut your other SEO work

Customer experience damage

Slow pages also hurt how shoppers see your brand:

  • 57% of consumers won’t recommend businesses with poor mobile sites
  • 50% of users expect pages to load in 2 seconds or less
  • 22% of users say slow sites are their biggest frustration when shopping online

Common performance bottlenecks in Shopify stores

Most slow Shopify stores share the same problems:

Theme bloat

Many premium Shopify themes put visual features ahead of speed:

  • Too many JavaScript libraries
  • Images that load at full size
  • Duplicate CSS files
  • Animations and effects you do not need

App overload

The average Shopify store uses 6-20 apps, and each one adds weight:

  • Extra scripts on every page
  • Scripts competing to load first
  • Apps that do the same job
  • Leftover code from apps you already removed

Settings nobody revisits

Most store owners never go back to the theme and app settings below after launch. That leaves easy speed gains on the table.

Setting #1: How your theme loads JavaScript and CSS

The first setting is how your theme loads its assets: the JavaScript, CSS and other files that make your store work and look right. Getting this right is the base of any performance optimization work.

What Shopify already does with your theme files

Shopify processes your theme’s files before it serves them to visitors:

Default behavior

By default, Shopify:

  • Minifies CSS and JavaScript (removes unneeded characters)
  • Serves theme files from its global CDN
  • Adds a version number to each file URL so browsers can cache it

What Shopify cannot fix is how many files your theme loads, and when. That part is up to your theme code.

Where to find your theme code

To open your theme files:

  1. Log in to your Shopify admin
  2. Go to Online Store > Themes
  3. Click the … button on your current theme
  4. Select Edit code
  5. For theme.liquid, open the Layout folder
  6. For section code, open the main-product.liquid file in the Sections folder

Duplicate your theme first and test each change on the copy. Online Store 2.0 themes split each page into section files, which makes it easy to load code only where it is used.

Load section CSS inside the section file

Move CSS that only one section uses into that section’s file. Shopify then loads it only on pages that include the section:

{% comment %} sections/featured-collection.liquid {% endcomment %}
{{ 'section-featured-collection.css' | asset_url | stylesheet_tag }}

<div class="featured-collection">
  {% comment %} Section markup goes here {% endcomment %}
</div>

{% schema %}
{
  "name": "Featured collection",
  "settings": []
}
{% endschema %}

Visitors on other pages never download that file. Use your own theme’s file names.

Skip browser-side minification scripts

Do not add scripts that strip whitespace from the page after it loads. They add work on every page view and can delete text your shoppers need to see. If an older guide told you to add one just before the closing </head> tag, remove it. Shopify already minifies theme CSS and JavaScript. To find code your store loads but does not use, open Chrome DevTools, press Ctrl+Shift+P (Cmd+Shift+P on Mac) and run this command:

Show Coverage

Defer your theme’s JavaScript

Leave {{ content_for_header }} exactly as it is. Shopify and your apps need it, and editing it can break your store. Instead, add defer to your theme’s own scripts in theme.liquid. Deferred scripts run after the page is parsed, so they do not block the first render:

{{ content_for_header }}

{{ 'base.css' | asset_url | stylesheet_tag }}
<script src="{{ 'global.js' | asset_url }}" defer="defer"></script>

Keep critical CSS small

If your theme inlines CSS for the first screen, keep it to the header and hero. Put it before your main stylesheet in theme.liquid:

<style>
  /* Only the styles needed for the header and first screen */
  .header { display: flex; align-items: center; }
  .hero { min-height: 60vh; }
</style>
{% comment %} Your main stylesheet tag comes after this {% endcomment %}

Performance impact

Getting theme file loading right can bring clear gains:

  • JavaScript deferral: 15-30% improvement in First Contentful Paint
  • Critical CSS: 20-40% improvement in Largest Contentful Paint
  • Less unused CSS and JavaScript: 5-10% reduction in overall page weight

A real-world example: One Shopify Plus store implemented these optimizations and saw their Lighthouse performance score increase from 43 to 78, with a corresponding 23% increase in mobile conversions.

Setting #2: How your theme serves images

Images typically account for 50-80% of a Shopify store’s page weight. Shopify gives you good image optimization tools, but your theme has to use them.

What Shopify’s image CDN does for you

Every image you upload is served through the Shopify CDN, which can resize it on request:

Default behavior

By default, Shopify:

  • Serves images through its global CDN
  • Sends WebP or AVIF to browsers that support them
  • Creates any width your theme asks for

The catch is that older theme code often asks for one large size, with no width or height and no lazy loading.

Where image code lives

There is no admin switch for this. You change it in your theme’s Liquid code:

  1. Open your theme code (Online Store > Themes > Edit code)
  2. Find the sections and snippets that output product images (often main-product.liquid and card-product.liquid in Online Store 2.0 themes)
  3. Replace any img_url filters with image_url and image_tag, as shown below

Use image_url and image_tag

WebP images are 25-35% smaller than equivalent JPEGs. You do not need format: 'webp' for that: Shopify picks the best format for each browser when you use image_url. For product images in a collection grid, below the first screen:

{% for product in collection.products %}
  {% if product.featured_image %}
    {{ product.featured_image | image_url: width: 600 | image_tag: loading: 'lazy' }}
  {% endif %}
{% endfor %}

The image_tag filter adds width, height and the image’s alt text for you. If your theme writes its own img tags, set width and height yourself so the page does not jump as images load:

<img
  src="{{ product.featured_image | image_url: width: 800 }}"
  width="800"
  height="{{ 800 | divided_by: product.featured_image.aspect_ratio | round }}"
  alt="{{ product.featured_image.alt | escape }}"
  loading="lazy">

Serve smaller images to phones

Set widths and sizes so phones download a small file and large screens get a sharp one. image_tag builds the srcset for you:

{{ product.featured_image | image_url: width: 1200 | image_tag: widths: '400, 800, 1200', sizes: '(max-width: 600px) 100vw, 50vw', loading: 'lazy' }}

Load the hero image early with preloading

Do not lazy-load the first large image on the page. It is usually your Largest Contentful Paint (LCP) element. In your hero or slideshow section file, load it right away and mark it as high priority:

{% if section.settings.image %}
  {{ section.settings.image | image_url: width: 1500 | image_tag: loading: 'eager', fetchpriority: 'high', preload: true, widths: '750, 1100, 1500', sizes: '100vw' }}
{% endif %}

Performance impact

Done well, these image changes typically bring:

  • 30-50% reduction in image payload size
  • 15-25% improvement in Largest Contentful Paint
  • Significant bandwidth savings for mobile users

A case study: A fashion Shopify store with 200+ product images implemented these optimizations and reduced their average page weight from 3.2MB to 1.4MB, with mobile page load time decreasing from 6.2 seconds to 2.8 seconds.

Setting #3: Browser caching for returning shoppers

Browser caching decides how long shoppers’ browsers keep your store’s files, which shapes how fast repeat visits feel. Shopify handles most of this for you. Your job is to avoid code that works against it.

How Shopify caches your store

Shopify caches your store at several layers:

Default behavior

By default, Shopify:

  • Serves theme files, images and fonts from its global CDN
  • Adds a version to each theme file URL, so browsers can keep files for a long time
  • Changes that version when you edit a file, so shoppers get the new copy

These defaults work well. Most caching problems come from custom code that tries to work around them.

What you can control

Shopify does not offer cache controls in the admin, and you do not need them. You can control:

  1. Checking the cache headers Shopify already sends
  2. Removing old service worker code
  3. Loading theme files and fonts through Shopify’s filters

Check the cache headers Shopify already sends

Older guides told you to add a cache script just before the closing </head> tag. A script cannot change the cache headers Shopify sends, so skip it. To see those headers, copy a theme file URL from your page source and run this command in a terminal:

curl -sI "https://your-store.com/cdn/shop/t/1/assets/base.css?v=123"

Remove old service worker code

A custom service worker can show shoppers old prices and stock levels. Shopify also serves theme files from a /cdn/ path, so a service worker stored there cannot control your store pages. If an old theme or app added one, search your theme code for these lines and remove them:

navigator.serviceWorker.register
rel="serviceworker"

Fonts are cached by the Shopify CDN too. Load your theme font with swap, so text shows while the font downloads:

<style>
  {{ settings.type_body_font | font_face: font_display: 'swap' }}
</style>

Let Shopify version your files

You do not need your own version numbers. Shopify adds one to every theme file URL and updates it when the file changes:

  1. Edit and save a file in Edit code. Shopify updates the ?v= value in its URL, which looks like this:
https://your-store.com/cdn/shop/t/1/assets/base.css?v=123456789
  1. Do not add your own ?version= value. Shopify already does this job.
  2. Keep loading theme files through asset_url, like this:
{{ 'base.css' | asset_url | stylesheet_tag }}
<script src="{{ 'global.js' | asset_url }}" defer="defer"></script>

Performance impact

Caching that works with Shopify instead of against it can bring big gains on repeat visits:

  • 70-90% faster page loads for returning visitors
  • 40-60% reduction in bandwidth usage
  • Improved perceived performance throughout the shopping journey

A real example: An electronics Shopify store implemented these caching optimizations and saw their repeat visitor bounce rate decrease by 31%, with average session duration increasing by 45%.

Setting #4: Your apps and third-party script management

Third-party scripts for analytics, marketing and app features are often the biggest drag on Shopify stores. The fix starts with your app list, not with clever code.

The third-party script problem

The average Shopify store includes 30+ third-party scripts, and each one adds work for the browser:

Common culprits

  • Analytics tools (Google Analytics, Facebook Pixel, etc.)
  • Marketing tools (email popups, chat widgets, etc.)
  • Social media integrations
  • Reviews and UGC widgets
  • Retargeting pixels

Many of these scripts load early and compete with your own code. That slows the first render and makes the page slow to respond to taps and clicks.

Where to manage scripts

You manage third-party scripts in three places:

  1. Your app list and app embeds in the theme editor
  2. Section files, which load code only on pages that use them
  3. Delayed loading for widgets shoppers do not need right away

List the scripts on your store

Start with an audit. Open your store, open the browser console (F12 in most browsers) and paste this. It lists every domain your page loads scripts from:

[...document.scripts]
  .filter(s => s.src)
  .map(s => new URL(s.src).hostname)
  .filter((host, i, all) => all.indexOf(host) === i)
  .forEach(host => console.log(host));

Remove apps and app code you no longer use

Match each domain to an app, then clean up:

  1. In the theme editor, open App embeds and turn off embeds for apps you no longer use
  2. Uninstall unused apps in Settings > Apps and sales channels
  3. Search your theme code for each removed app’s name, because some apps leave code behind
  4. Delete leftover lines that render a removed app’s snippet, such as:
{% render 'old-app-widget' %}

Load page-specific scripts only where they are used

If a script only matters on product pages, load it from the product section file instead of theme.liquid. Online Store 2.0 section files make this simple:

{% comment %} sections/product-reviews.liquid {% endcomment %}
<div class="product-reviews">
  {% comment %} Section markup goes here {% endcomment %}
</div>

<script src="{{ 'product-reviews.js' | asset_url }}" defer="defer"></script>

Delay widgets until the shopper interacts

Chat widgets and similar tools rarely need to load with the page. This lazy loading pattern loads one only after the first scroll, tap or key press, which keeps the main thread free while the page loads and helps Interaction to Next Paint (INP). Replace the example URL with your widget’s script URL:

<script>
  (function () {
    var loaded = false;
    function loadWidget() {
      if (loaded) return;
      loaded = true;
      var s = document.createElement('script');
      s.src = 'https://widget.example.com/chat.js';
      s.async = true;
      document.body.appendChild(s);
    }
    ['scroll', 'pointerdown', 'keydown'].forEach(function (type) {
      window.addEventListener(type, loadWidget, { once: true, passive: true });
    });
  })();
</script>

Performance impact

Good third-party script management typically yields:

  • 30-50% improvement in Time to Interactive (an older lab metric that Lighthouse no longer reports)
  • 20-40% reduction in Total Blocking Time
  • 15-25% improvement in First Input Delay. INP replaced FID as a Core Web Vital in March 2024, and the same script cleanup helps INP.

A case study: A beauty products Shopify store implemented these script management techniques and reduced their JavaScript execution time from 3.7 seconds to 1.2 seconds, with a corresponding 27% decrease in bounce rate.

Setting #5: Shopify checkout optimization

Shopify runs the checkout itself, so you cannot rewrite its code. You can still change the settings around it, which affect both speed and conversion rate.

What you can and cannot change in checkout

Shopify checkout has clear limits:

  • Core checkout code cannot be modified
  • checkout.liquid is retired, and Shopify Plus stores now use Checkout Extensibility
  • Performance is largely controlled by Shopify

Within those limits, a few settings still make a real difference.

Where checkout settings live

For Shopify Plus merchants, checkout customization is available through:

  1. The checkout and accounts editor
  2. Checkout UI extensions from apps
  3. Shopify Functions for discount, shipping and payment rules

For all other Shopify merchants, you can still improve checkout through:

  1. Checkout settings in the Shopify admin
  2. Fewer apps that touch the cart and checkout
  3. A lighter cart page

Turn on accelerated checkout

Turn on accelerated checkout options in your Shopify admin:

  1. Go to Settings > Payments
  2. Turn on Shop Pay
  3. In the theme editor, open your product page and turn on dynamic checkout buttons in the buy buttons block

If your theme writes its own product form, put the payment button inside the form, once:

{% form 'product', product %}
  <input type="hidden" name="id" value="{{ product.selected_or_first_available_variant.id }}">
  <button type="submit" name="add" {% unless product.available %}disabled{% endunless %}>Add to cart</button>
  {% if product.available %}
    {{ form | payment_button }}
  {% endif %}
{% endform %}

Trim checkout with the checkout editor

On Shopify Plus, do not look for checkout.liquid. It is retired. Use the checkout editor instead, and keep only the blocks you need:

Shopify admin > Settings > Checkout > Customize
  - Remove app blocks you no longer use
  - Keep extra fields to the ones you need

Let Shopify remember checkout details

Do not save email addresses or shipping addresses in the browser’s localStorage. Any script on the page can read it, which puts customer data at risk. Shopify keeps the cart, and Shop Pay remembers returning buyers. A clear link back to the cart is enough:

<a href="{{ routes.cart_url }}">View cart ({{ cart.item_count }})</a>

Keep the path to checkout light

For all Shopify merchants: send shoppers from the cart to checkout with Shopify’s standard cart form, and keep pop-ups and upsell scripts off the cart page:

<form action="{{ routes.cart_url }}" method="post">
  <button type="submit" name="checkout">Check out</button>
</form>

Performance impact

Getting checkout settings right typically results in:

  • 15-25% reduction in checkout abandonment
  • 10-20% improvement in checkout completion time
  • 5-15% increase in conversion rate from cart to completed purchase

A real example: A home goods Shopify store implemented these checkout optimizations and saw their checkout completion rate increase from 43% to 58%, resulting in a 35% increase in overall conversions.

How to apply all five settings: a step-by-step plan

Here is the order we suggest. Work on a duplicate theme, and measure before and after.

Step 1: Measure where you are now

Before making changes, record your starting numbers:

  1. Run a Lighthouse audit in Chrome DevTools
  2. Note your scores for:
    • Performance
    • First Contentful Paint
    • Largest Contentful Paint
    • Cumulative Layout Shift
    • Total Blocking Time
  3. Check your Core Web Vitals (LCP, INP and CLS) in Google Search Console
  4. Record your current conversion rate and bounce rate

Step 2: Clean up theme JavaScript and CSS

  1. Move section-only CSS into its section file
  2. Remove any browser-side minification script
  3. Add defer to theme scripts and leave content_for_header unchanged
  4. Keep inline critical CSS small

Step 3: Fix image delivery

  1. Replace img_url with image_url and image_tag, and drop format: 'webp'
  2. Set widths and sizes so phones get smaller files
  3. Load the hero (LCP) image early with fetchpriority="high"
  4. Lazy-load images below the first screen, and only those

Step 4: Let browser caching work

  1. Remove old service worker code
  2. Load theme files through asset_url, with no custom version strings
  3. Check the cache headers Shopify sends

Step 5: Audit apps and third-party scripts

  1. List every script domain on your store
  2. Turn off unused app embeds and uninstall unused apps
  3. Move page-specific scripts into section files
  4. Delay chat and similar widgets until the first interaction

Step 6: Tidy up checkout

  1. Turn on Shop Pay and dynamic checkout buttons
  2. On Shopify Plus, remove unused blocks in the checkout editor
  3. Never store customer details in localStorage
  4. Keep pop-ups and extra scripts off the cart page

Step 7: Measure results and refine

After you make the changes:

  1. Run another Lighthouse audit
  2. Compare before/after metrics
  3. Monitor real-user performance for 1-2 weeks
  4. Make additional adjustments based on data

Expected results

When all five settings are in good shape, you can expect:

  • 40-60% improvement in overall Lighthouse performance score
  • 30-50% reduction in page load time
  • 15-30% improvement in conversion rate
  • 20-40% reduction in bounce rate

Conclusion: keep your store fast

These five settings are standard theme, app and checkout settings that most stores overlook. Getting them right gives you a real edge in site speed and user experience.

Website performance is ongoing work, not a one-time task. As your store grows, keep doing these four things:

  1. Monitor performance metrics regularly using tools like Lighthouse and Google Search Console
  2. Test new optimizations in a staging environment before deploying to production
  3. Stay updated on Shopify changes that might affect your optimizations
  4. Regularly audit third-party scripts to eliminate unnecessary performance drains

Every millisecond matters in e-commerce. Fast stores tend to beat slower competitors in both search rankings and conversion rates.

Want to see how Shopify compares with other platforms? Read our speed benchmarks for WordPress, Shopify, Webflow and Wix.

Get a free speed analysis of your Shopify store

Slow pages cost you sales every day. Research shows that optimized stores convert at rates 1.5-2x higher than non-optimized competitors.

If you would rather not edit theme code, WebBoost handles speed optimization for you. Add one line of code, and WebBoost applies 15+ speed optimizations automatically, with no rebuild, and keeps monitoring your store.

See how fast your store could be. Run a free speed analysis to find out what slows your Shopify store down and what to fix first.

Get your free speed analysis →

Our technology guarantees an 80+ Mobile Speed Score. Start with our 14-day free trial, or run your free speed analysis first to see where your store stands today.