Hello Themeco Support,
I’m currently working on optimizing our homepage for performance and need clarification on how to properly conditionally render sections based on device type in Cornerstone.
Specifically, I have a desktop video hero section that should only load on desktop. For mobile, we have a separate image-based header. I’ve tried the following:
- Hiding the desktop video section using “Hide During Breakpoints” (works visually, but video still loads on mobile). The DOM shows it is still being loaded, I assume this is adding a display:hidden to that section.
- Using conditions such as
{{dc:is.device}} is desktop
and{{dc:global:device}} is desktop
in the visual Condition builder (section still hides unexpectedly or does not evaluate correctly) - Reviewed all available documentation on theme.co/docs, including the Parameters and Dynamic Content pages, but couldn’t find a supported way to detect device reliably via Conditions
Despite these attempts, the video is still loading on mobile and affecting LCP and overall performance scores . My main goal is to prevent the video from loading at all on mobile — not just hide it with CSS.
Could you please advise:
- What is the officially supported method for rendering content conditionally based on device (desktop, tablet, mobile)?
- Is there a documented dynamic content token or a method compatible with the visual Conditions builder that supports this?
- If not, is this something that can be accomplished reliably with
[cs_condition]
, or would JS-based removal remain the only viable workaround?
I’m currently on Pro version 6.6.10 , and have confirmed this behavior across multiple devices and browsers.
Thank you for your guidance!