100% Working Shopify Speed Optimization Without Apps (Pure Shopify Method)

100% Working Shopify Speed Optimization Without Apps (Pure Shopify Method)

Most Shopify speed optimization guides recommend installing apps to fix speed problems. The irony is that apps cause most speed problems in the first place. A pure Shopify optimization approach - using native platform features, custom Liquid code, and browser-native capabilities - can achieve scores of 75 to 90 on mobile without a single optimization app installed. The method is more durable, faster, and cheaper to maintain than any app-dependent approach.

75-90
Mobile PageSpeed achievable with zero optimization apps installed
600KB
JavaScript added by a typical 10-15 app stack on Shopify stores
$7,200
Annual app subscription cost for a store with 10-15 apps at typical rates
10mo
Break-even point where custom code becomes cheaper than app subscriptions

Why Avoiding Apps Is the Right Starting Point

App-heavy versus app-free Shopify store performance infographic showing on the left a store with 15 app icons including cart app, popup app, review app, and loyalty app with 600KB JavaScript, 12 external connections, and a mobile PageSpeed score of 38, and on the right the same store using native Shopify features like Cart API, CDN, and Liquid with only 120KB JavaScript, 2 external connections, and a mobile PageSpeed score of 82
App-Heavy vs App-Free Shopify Store Performance - replacing app-powered features with native Shopify capabilities reduces JavaScript from 600KB to 120KB, cuts external connections from 12 to 2, and raises mobile PageSpeed from 38 to 82

Every Shopify performance guide eventually reaches the same uncomfortable conclusion: the fastest Shopify stores have the fewest apps. Not because apps are inherently bad, but because each one adds a layer of JavaScript, CSS, and network requests that compounds across every page load.

The economics work against you. You install an app to solve a problem. The app loads a script globally. Six months later you install another app. Then another. Each felt like a small addition. Collectively they have added 600KB of JavaScript, twelve external network connections, and 3 seconds to your mobile load time.

The app-free optimization approach starts from a different premise: before installing anything, exhaust what Shopify already provides natively. The platform has grown significantly. Features that required third-party apps two or three years ago now exist natively in Shopify itself. Native code performs better than third-party code in almost every case, because native code runs in the same environment as the platform, uses the same APIs without wrappers, and does not require external network requests to initialize.

What Native Shopify Already Does for You

Native Shopify platform capabilities diagram showing the Shopify logo in the center with six spokes radiating outward to native features: CDN Image Delivery replacing image optimization apps, Cart API replacing cart drawer apps, Product Recommendations API replacing recommendation apps, Storefront API replacing data apps, Native Lazy Loading replacing lazy load apps, and Section-Specific JS and CSS replacing script manager apps
Native Shopify Platform Capabilities - six built-in features that replace common third-party apps, each available to every Shopify store with no subscription fee and no external JavaScript

Before writing a single line of custom code, understand what Shopify handles without any intervention.

Image Delivery and CDN

Shopify automatically serves all uploaded images through a global CDN. The image_url Liquid filter with a width parameter generates the correctly-sized WebP image on Shopify's CDN and serves it from the nearest edge server. No image optimization app required.

{{ product.featured_image | image_url: width: 800, format: 'webp' }}
Asset Minification

CSS and JavaScript files stored in your theme's assets folder are automatically minified by Shopify when served to visitors. The minification happens at the CDN level. No minification plugin needed.

HTTP/2 and Brotli Compression

Shopify's servers use HTTP/2 and Brotli compression by default. All assets are compressed before transfer. Response headers are multiplexed. These infrastructure-level optimizations apply to every Shopify store automatically.

Native Product Recommendations

Shopify provides a product recommendations API at /recommendations/products.json. Pass a product ID and limit, receive recommendations based on purchase and browsing data. No recommendation app required for most use cases.

Built-in Cart API

Shopify's cart API is available natively via JavaScript. A custom cart drawer requires no cart app - it requires familiarity with fetch('/cart/add.js') and the Cart API endpoints. Shopify's own Dawn theme demonstrates this completely.

Back-in-Stock, Gift Cards, Discounts

Back-in-stock notifications are available natively through Shopify's storefront for most plan levels. Gift cards and discount codes are native to Shopify checkout. Check your Online Store settings before installing third-party apps for any of these.

Native Shopify Optimization Techniques

With the platform's built-in capabilities understood, here are the optimization techniques that require no external dependencies.

1
Use Dawn as a Performance Reference
Shopify's Dawn theme is open source and built to the highest performance standards the platform supports. Study how it handles variant switching without jQuery, structures JavaScript into small page-specific modules, implements lazy loading throughout the template, and manages font loading and CLS prevention. Dawn's source code on GitHub is the single best reference for performant Shopify theme development.
2
Implement Native Lazy Loading Throughout Your Theme
Native browser lazy loading requires no JavaScript. Add loading="lazy" to every image below the fold. Zero JavaScript. Zero dependencies. Supported by every modern browser.
{% for product in collection.products %}
  <img
    src="{{ product.featured_image | image_url: width: 400, format: 'webp' }}"
    loading="{{ forloop.first ? 'eager' : 'lazy' }}"
    width="{{ product.featured_image.width }}"
    height="{{ product.featured_image.height }}"
    alt="{{ product.featured_image.alt | escape }}"
  >
{% endfor %}
3
Build Section-Specific JavaScript and CSS
Shopify's section schema supports loading JavaScript and CSS only when a section is used on a page. A product page with no testimonials section loads no testimonials code. No optimization app achieves this level of precision - it requires understanding Shopify's section architecture.
{% schema %}
{
  "name": "Testimonials",
  "stylesheet": "section-testimonials.css",
  "javascript": "section-testimonials.js"
}
{% endschema %}
4
Implement a Custom Cart Drawer Without Apps
The cart drawer is one of the most commonly app-powered features on Shopify stores. The core implementation using Shopify's Cart API natively is lighter, faster, and more customizable than any cart app. It makes two fetch requests and updates your UI directly - no external script download, no external network connection, no third-party JavaScript.
async function addToCart(variantId, quantity = 1) {
  const response = await fetch('/cart/add.js', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ id: variantId, quantity })
  });

  if (response.ok) {
    const cartResponse = await fetch('/cart.js');
    const cart = await cartResponse.json();
    updateCartUI(cart);
    openCartDrawer();
  }
}

function updateCartUI(cart) {
  document.querySelector('.cart-count').textContent = cart.item_count;
  // Render cart items from cart.items array
}
5
Replace Popup Apps with Native Browser APIs
A custom popup implementation requires no app. Combined with a Liquid snippet for the popup HTML and a small CSS block for the styles, 30 lines of code replace a popup app with zero external dependencies that load instantly.
// Show popup after 8 seconds, only once per session
function initEmailPopup() {
  if (sessionStorage.getItem('popup_shown')) return;

  setTimeout(function() {
    document.querySelector('.email-popup').classList.add('visible');
    sessionStorage.setItem('popup_shown', 'true');
  }, 8000);
}
6
Build Recently Viewed Products Without an App
Recently viewed products use localStorage to persist product data between pages. This replaces a recently-viewed-products app with lightweight, dependency-free JavaScript that runs entirely in the browser.
const RecentlyViewed = {
  getProducts() {
    return JSON.parse(localStorage.getItem('recently_viewed') || '[]');
  },
  addProduct(productData) {
    const products = this.getProducts();
    const filtered = products.filter(p => p.id !== productData.id);
    filtered.unshift(productData);
    localStorage.setItem('recently_viewed', JSON.stringify(filtered.slice(0, 8)));
  }
};

// On product pages, store current product
RecentlyViewed.addProduct({
  id: {{ product.id }},
  title: {{ product.title | json }},
  url: '{{ product.url }}',
  image: '{{ product.featured_image | image_url: width: 300, format: "webp" }}',
  price: {{ product.price }}
});

Custom Coding Strategies for Speed

Write Vanilla JavaScript, Not jQuery

jQuery is a 30KB library that modern JavaScript replaced. Every DOM operation jQuery performs can be done natively with less code and no library download. Modern browsers support querySelector, classList, fetch, Promise, and async/await without any library.

Use CSS for Behavior Before JavaScript

Many interactive behaviors can be implemented in CSS without JavaScript: FAQ accordions using <details> and <summary> elements, tab interfaces using CSS :target, image galleries using CSS scroll snap, sticky elements using position: sticky, and hover dropdowns using CSS :hover.

Use Intersection Observer for Scroll Behavior

Any behavior that needs to trigger based on scroll position should use Intersection Observer, not scroll event listeners. Intersection Observer runs off the main thread and is built into the browser. This replaces JavaScript scroll libraries like AOS and ScrollReveal with a few lines of native browser code.

// Animate elements into view as they scroll - no library needed
const animateObserver = new IntersectionObserver(entries => {
  entries.forEach(entry => {
    if (entry.isIntersecting) {
      entry.target.classList.add('animate-in');
      animateObserver.unobserve(entry.target);
    }
  });
}, { threshold: 0.1 });

document.querySelectorAll('.animate-on-scroll').forEach(el => {
  animateObserver.observe(el);
});
Structure code as ES modules. Using type="module" on script tags gives you automatic deferred loading (modules are always deferred), strict mode by default, and proper code isolation. Module scripts load asynchronously and execute after the DOM is ready. No defer attribute needed. No dependency management library required.

Reducing Dependencies Throughout Your Shopify Store

Dependency reduction is a systematic practice, not a one-time action. Create a dependency register listing every library, framework, and external resource your theme uses, then evaluate each against native alternatives.

Dependency Size Purpose Native Alternative
jQuery 30KB DOM manipulation Vanilla JS
Swiper.js 65KB Image carousel CSS scroll snap
Font Awesome 72KB Icons Inline SVG
Lodash 25KB Utility functions Native array methods
AOS 15KB Scroll animations Intersection Observer

Apps vs Custom Code: An Honest Comparison

Where Custom Code Wins Clearly
  • Functionality that loads on every page (cart drawer, popups, recently viewed)
  • Long-term maintenance - code you own cannot change pricing or shut down
  • Features with straightforward requirements (popup timers, FAQ accordions, countdown timers)
  • Any feature where the app wraps simple functionality in complex infrastructure
Where Apps Still Make Sense
  • Complex integrations with external platforms (email marketing, accounting, shipping carriers)
  • Functionality requiring ongoing data management (review moderation, loyalty points, subscriptions)
  • Rapidly evolving features (payment processing, tax computation, shipping rate calculation)
The practical framework - before installing any app, answer three questions: Does Shopify natively support this? Can this be done with 50 to 100 lines of custom code? Does this feature need to load on every page or only specific ones? If the answer to the first two is yes, custom code is the right choice. If the feature requires server-side processing or external API management, the app is justified.

Performance Benefits of the App-Free Approach

Fewer External Network Connections

Each app domain requires a separate network connection. Ten apps mean at least ten external DNS lookups, TCP handshakes, and TLS negotiations. On mobile, each connection adds 50 to 200ms of overhead. An app-free store makes connections only to Shopify's CDN and whatever minimal external services you genuinely need.

Reduced JavaScript Execution Time

App JavaScript runs in the same browser environment as your theme code, competing for the same main thread. A custom cart drawer initialized in 15ms versus an app cart drawer initializing in 120ms across 1,000 daily visitors is 1.75 minutes of combined visitor wait time saved every day.

No App Update Regression Risk

Apps update their code on their own schedule. A well-performing store can regress overnight when an app releases an update that adds new JavaScript weight without notice. Custom code changes only when you change it.

Lower Cumulative Layout Shift

App-injected content frequently causes CLS because apps cannot predict the exact layout of your theme. Native Liquid-rendered content is part of the same render pass as the rest of your page, reducing unexpected layout shifts.

Cost vs Performance: The True Calculation

Shopify app subscriptions versus custom code cost comparison infographic showing on the left a 12-month timeline with monthly app subscription costs of 200 to 600 dollars adding up to 7200 dollars per year in red, on the right a one-time custom development cost of 1500 dollars with zero monthly fees in green, and below a break-even chart at 10 months where custom code becomes cheaper
Shopify App Subscriptions vs Custom Code Cost Comparison - a one-time custom development investment of $1,500 breaks even against app subscriptions at 10 months and saves money every month after, while also delivering better performance
The True Cost of Apps

A typical Shopify store with 10 to 15 apps pays 200 to 600 dollars per month in app subscription fees. Over 12 months, that is 2,400 to 7,200 dollars. The hidden cost is performance: a store scoring 38 on mobile PageSpeed versus 72 is not just a score difference - it is conversion rate. Google's research shows each second of LCP above 2.5 seconds reduces mobile conversion probability significantly.

The True Cost of Custom Code

Developer time is the primary cost. A skilled Shopify developer replacing a cart app, a popup app, and a recently-viewed-products app with custom code might spend 8 to 15 hours - a one-time cost of 800 to 2,000 dollars. After the initial implementation, maintenance costs are low: an hour or two per quarter. Custom code has no ongoing subscription cost.

Testing Pure Shopify Optimization Improvements

1
Establish a baseline before removing apps. Run three PageSpeed Insights tests on the affected page types and document your baseline scores. Record total external domains, script count, and total transfer size in Chrome DevTools Network tab.
2
Test the custom replacement on a development theme. Shopify lets you create duplicate themes. Build your custom replacement on a duplicate theme and run the same three-test sequence. The comparison shows the performance gain from the replacement.
3
Functional testing before going live. Write a test checklist covering every scenario the app handled - adding single and multiple items, updating quantities, discount code application, out-of-stock variant handling, and error states when the cart API fails.
4
Monitor post-launch for one week. After switching to the custom implementation, monitor conversion rate, cart abandonment rate, and customer support contact volume. If conversion rate stays stable or improves, the custom code is working as intended.

Best Practices for the App-Free Approach

Default to Native First

Evaluation order: (1) does Shopify already support this natively, (2) can this be built in under 100 lines of code, (3) does an app exist that covers exactly this need without excess features, (4) is the app's performance cost justified by the business value.

Keep a Performance Budget

Set a target: no more than 5 external script domains, total JavaScript below 300KB, and mobile PageSpeed above 65. Every new feature proposal gets evaluated against this budget. If a proposed feature would break the budget, alternatives must be explored first.

Review Dawn Theme Updates Quarterly

Shopify regularly improves Dawn's performance characteristics and adds new native features. Reviewing Dawn updates quarterly reveals new native capabilities that may allow you to remove custom code you wrote as a workaround for missing platform features.

Document Every Custom Implementation

Write a brief document for each custom feature explaining what it does, how it is implemented, which theme files it touches, and what to check if something breaks. Always work on a duplicate theme when making significant changes and keep the previous working version available as a fallback.

Summary

The fastest Shopify stores are not the ones with the best optimisation apps. They are the ones that understood what the platform already provides and built carefully on top of it rather than layering dependency upon dependency.

Native lazy loading, Shopify's CDN image delivery, the Cart API, the Storefront API, CSS scroll snap, Intersection Observer, the <details> element, ES modules - these are all performance-first capabilities available to every Shopify store with no subscription fee and no external JavaScript.

Use native Shopify features first. Write custom code for what native features do not cover. Install apps only for functionality that genuinely requires their backend infrastructure. Test everything, document what you build, and maintain it like the performance investment it is.

The stores that achieve this discipline do not just score better in PageSpeed. They convert better, rank higher, and spend less every month than stores that treated every problem as an app installation away from being solved. For stores that need automated image optimization and performance monitoring without adding general-purpose app bloat, Ecom: Page Speed Expert is purpose-built around Shopify's architecture to keep your store lean rather than adding to it.
Back to blog

Frequently Asked Questions


For a small store with straightforward needs, yes. For a growing store with complex requirements — subscriptions, wholesale pricing, advanced loyalty programs, multi-channel inventory — some apps are genuinely the right tool. The goal is not zero apps but minimum necessary apps, with everything replaceable by native code handled natively.


Show the math. Run a PageSpeed comparison between your current app-heavy store and a development theme with the replaced functionality. Quantify the conversion rate impact of the speed difference using Google's conversion rate impact research. Calculate the 12-month cost of current apps versus one-time development cost. The business case is usually compelling once the numbers are visible.


Shopify's theme ecosystem includes many well-optimized themes (Dawn, Sense, Craft) that include common functionality natively. Starting with a performant theme reduces the need for custom code. For specific features, Shopify's developer community includes freelancers and agencies experienced in performance-first development. The one-time cost is typically worthwhile for functionality you will use long-term.


Only if you remove your review app. Product reviews are one category where app infrastructure (storing reviews, moderating submissions, syncing to Google Shopping) genuinely justifies the performance cost. This is a case where the app earns its place. Replace apps that provide functionality the browser can handle natively. Keep apps that provide backend infrastructure your store cannot.


These are legitimate cases for apps. Subscription management involves billing, payment processing, and customer account management that are genuinely complex to build and maintain. Loyalty programs require server-side point tracking and redemption logic. These categories are outside the scope of what custom JavaScript in a theme should handle. The native approach applies to frontend features — UI, interactions, display — not backend business logic.