Quick Fix with Thunder
Thunder Page Speed Optimizer helps reduce the performance impact of third-party scripts, heavy resources, images, and Core Web Vitals bottlenecks automatically. It cannot rewrite another company's cache headers, but it can improve the page around those assets and help you see which third-party costs are still worth manual cleanup.
What the Cache Policy Warning Means
PageSpeed flags static assets with short cache lifetimes because repeat visitors may need to download them again too soon. On a pure custom site, a developer can often adjust server headers. On Shopify, storefront assets are split across Shopify's CDN, your theme, app vendors, tracking platforms, font providers, video embeds, and ad networks. You control some of that stack, but not all of it.
This is why merchants get frustrated with the warning. They see a third-party JavaScript file from a reviews app, chat widget, pixel, or attribution tool and look for a Shopify setting that does not exist. If the file is served from the vendor's domain, the vendor sets the cache lifetime. Your job is to decide whether that vendor should load, where it should load, and whether a lighter pattern can replace it.
Cache policy belongs beside Shopify efficient cache policy, third-party script impact, app speed optimization, and the complete Shopify speed optimization guide.
Which Assets You Can Control on Shopify
Theme assets
Files uploaded to your Shopify theme, such as CSS, JavaScript, images, and fonts, are the safest place to optimize. You can remove dead files, compress images, split scripts, and avoid loading old assets. Shopify's CDN handles delivery, but you still control what gets requested.
Approved static vendor files
Some libraries can be self-hosted if the license and vendor documentation allow it. Examples include a local slider library, a small helper script, or a font file you are licensed to host. This is different from copying a live app script that expects vendor updates.
App embeds and pixels
You usually cannot change their cache headers. You can disable unused app embeds, remove duplicate pixels, limit widgets to relevant templates, and delay non-critical UI until after the first screen is usable.
Manual Step-by-Step: Handle Third-Party Cache Warnings
1. Sort assets by ownership
Open DevTools Network or PageSpeed and group flagged URLs into Shopify CDN, your theme, app vendors, pixels, fonts, video embeds, and marketing tools. Fix your own assets first. Vendor-owned assets need a different decision.
Shopify-controlled:
cdn.shopify.com/s/files/.../theme.css
cdn.shopify.com/s/files/.../custom.js
Vendor-controlled:
reviews-app.example/widget.js
analytics.example/pixel.js
chat.example/launcher.js 2. Remove assets from templates that do not need them
A product review widget may belong on product pages but not on blog posts. A store locator script may belong on one page, not the whole storefront. Theme app extensions and app embeds should be scoped as tightly as the app allows.
{% if template.name == 'product' %}
<script src="https://vendor.example/reviews.js" defer></script>
{% endif %} 3. Use facades for heavy embeds
Video, maps, chat, and social embeds often load many files with cache policies you do not control. Replace the full embed with a static preview or lightweight button, then load the third-party code only after interaction.
<button class="chat-facade" data-load-chat>
Chat with us
</button>
<script>
document.querySelector('[data-load-chat]')?.addEventListener('click', () => {
const script = document.createElement('script');
script.src = 'https://chat.example/widget.js';
script.defer = true;
document.head.appendChild(script);
});
</script> 4. Self-host only what is safe
Self-host fonts, small libraries, and approved static assets when you are allowed to. Do not copy app scripts, payment scripts, tracking pixels, or constantly updated vendor code into your theme. That can break consent handling, analytics, support, and future security fixes.
@font-face {
font-family: 'Brand Sans';
src: url('{{ "brand-sans.woff2" | asset_url }}') format('woff2');
font-display: swap;
font-weight: 400;
} 5. Ask vendors for better caching
If a critical app ships static files with very short cache lifetimes, contact support with the exact URL from PageSpeed and ask whether they can improve cache headers or provide a lighter embed. Good vendors understand the request. If they cannot help and the widget is not producing revenue, remove or replace it.
6. Retest repeat views and mobile performance
Cache policy matters most for repeat visitors, but the same third-party assets can also hurt first-load network payload, main-thread work, and INP. Retest with the free Shopify speed test, then compare mobile speed metrics and Shopify speed score vs PageSpeed Insights.
Manual Fix vs Thunder Fix
| Cache problem | Manual fix | Thunder fix |
|---|---|---|
| Vendor script has short cache | Ask vendor, remove app, or load it only where needed. | Reduces surrounding third-party script impact where possible. |
| Heavy embed loads globally | Use a facade, interaction trigger, or template condition. | Improves page resource loading and Core Web Vitals baseline. |
| Theme asset is stale or unused | Remove the file or stop referencing it in Liquid. | Helps optimize delivered storefront resources after cleanup. |
| Fonts load from third party | Self-host licensed WOFF2 files and use font-display swap. | Pairs with font and resource optimizations for faster rendering. |
What Not to Do
Do not chase a perfect cache-policy score by breaking revenue tools. Reviews, subscriptions, analytics, fraud checks, and chat can matter. The right question is whether each third-party asset earns its place on that exact template. Remove what does not, contain what does, and keep the Shopify-controlled page as lean as possible.
For a broader cleanup plan, use app script fixes, GTM speed fixes, and Shopify resource hints. If you want the automated baseline first, review Thunder pricing and then clean the vendor stack with better data.
FAQ
Can I change cache headers for third-party Shopify app assets?
Usually no. If a script, image, or stylesheet is served from an app vendor's domain, the vendor controls its cache headers.
Why does PageSpeed flag third-party cache policy?
PageSpeed flags assets with short cache lifetimes because repeat visitors may need to re-download files sooner than necessary.
Should I copy third-party scripts into my Shopify theme?
No, not for active apps or pixels. Copying vendor scripts can break updates, consent behavior, analytics, and support.
What can Shopify merchants control?
You can remove unused apps, disable app embeds on templates that do not need them, self-host approved static assets, and replace heavy widgets with lighter patterns.
Can Thunder help with third-party assets?
Thunder helps reduce the storefront speed impact of third-party scripts and resource loading, while vendor-owned cache headers remain controlled by the vendor.