Tags:
- Action Required
- API
Standardization of Asset URL Version Parameters
We're updating the format of versioning query parameters appended to store assets such as CSS and JS. Previously, some assets used a bare numeric query parameter, (for example, ?108), while others used a key-value format with the v query parameter. Moving forward, all asset URLs will consistently use the format for versioning.
The new format will be returned by liquid tags and will be present in Shopify-rendered storefront HTML.
For example, an asset URL that previously looked like this: https://shop.example.com/cdn/shop/t/7/compiled_assets/styles.css?108
Will now look like this: https://shop.example.com/cdn/shop/t/7/compiled_assets/styles.css?v=108
These changes are being made to support upcoming infrastructure improvements.
Action Required:
Most themes will not require any changes. Themes utilizing standard Liquid asset filters to generate URLs will automatically output the updated format.
However, you should ensure that any app or custom theme code that uses asset URLs doesn’t require them to be expressed in the old bare numeric format. Regular expressions or logic specifically expecting a query string ending in only numbers should be updated to support the ?v= format.