Online store performance and site speed optimization
Hi Speed peeps!
Do you know if there is a way to target viewports with liquid? I just downloaded the Shopify Chrome extension to see the impact of liquid in our store, and found out that the mobile menu and desktop menu both take almost 500ms to render/compile. So I'm trying to find a way to achieve that using liquid. Any ideas?
Impossible. Liquid is rendered server side.
Only javascript can be aware of a browsers screen size.
Actually thats not true, Shopify could check for user agents and use that to create an option to serve screen size conditional code, but they don't have that implemented right now, I doubt they will in the near future as it's impractical, problematically inconsistent, to do, and requires a fair amount of work.
Blah, I did know that, and I've been looking for similar things in the past and learned that it's only for server-side stuff.
However, I do have Cloudflare set up for our shop. And Cloudflare knows the user agents and so on. Perhaps it could be possible to do something with that? Perhaps I could set something up in Cloudflare, that will pass on to Shopify for it to render more effectively?
Transform this holiday season into a shopping spree. Plus, learn how to effortlessly open ...
By Jasonh Dec 8, 2023Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023