{% style %} vs asset_url | stylesheet_tag filter, which is performant?

gnome_sayin
Tourist
11 0 1

Hi there,

 

Apologies if this was asked before.  Is there any performance hit using {% style %} vs asset_url | stylesheet_tag filter?  Or vice versa?

Reply 1 (1)

Sheesh_b
Shopify Partner
509 112 116

Hi @gnome_sayin 

Shopify minify the CSS automatically when processed so if it's from asset_url it will be very helpful to minify the CSS.

While {% style %} used in the sections or snippets so most probably not served as minified CSS.

 

Hope this helps.

We're here to simplify website creation for those looking to establish a strong online presence. Book a meeting slot if you want to discuss. It's FREE. BOOK NOW | Try Shopify for $1 for 3 Months: Shopify Trial | Shopify Web Store Developer |
LIKE or mark as ACCEPTED SOLUTION