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?
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024