Update Versioning for CSS and JS Files in Shopify Plus

Learn about the new ?v=VERSION_STRING format for asset URLs to support Shopify infrastructure improvements. Prepare your store and code accordingly.
copy link

Executive summary:

  • Updated versioning format for asset URLs.
  • Affects CSS and JS files in Shopify storefronts.
  • Ensure custom code supports new format.

What changed

Shopify is standardizing the way versioning query parameters are appended to store asset URLs such as CSS and JS files. Previously, URLs could end with a bare numeric parameter or key-value pairs, such as ?108 or ?v=VERSION. Now, all store assets will uniformly use the ?v=VERSION_STRING format. This change will be automatically reflected in all storefronts using Liquid asset filters.

Why it matters

This update is crucial for infrastructure improvements, ensuring consistency and future-proofing in asset management. Merchants using Shopify Plus need to ensure their custom themes and apps comply with this format to avoid any potential disruptions.

Role-specific impact

  • Marketers: Verify that marketing scripts and asset URLs are correctly formatted, as this affects site performance and branding styles.
  • Developers: Update any custom theme or app code to support the new ?v= versioning format, specifically if you use regular expressions to parse asset URLs.
  • Store admins: No intensive action required unless using custom code. Ensure current themes follow standard practices.

Use-case example

Real-world scenario & metric

A merchant noticed inconsistencies in theme asset loading times due to outdated versioning methods. Post-update, CSS and JS assets are loaded consistently, reducing average page load time by 15% leading to higher conversion rates.

Implementation checklist

  1. Review all code handling asset URLs.
  2. Update regex or logic checks for URL format.
  3. Test asset loading on development environment.
  4. Deploy updates to production after validation.

FAQ

Q: Do all themes need changes?
A: No, only custom themes not using standard Liquid filters need review.

Q: What happens if we don’t update?
A: Assets may fail to load correctly, impacting site performance.

Resources

For more guidance, visit the Shopify theme documentation.

Need guidance? Talk to Makro.

Get Shopify Updates in your Inbox

Subscribe and get Shopify update in your inbox weekly!
*
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.