- Issue created by @undersound3
I also have the same problem, have you solved it? I can't see any content on my mobile device either.
{% if is_mobile() %}
mobile{% endif %}
Is the text on the module project page still valid when you want to conditionally show some html in twig with the is_mobile function?
About the cache contexts:
By design, the "Internal Page Cache" core module assumes that all pages served to anonymous users will be identical, regardless of the implementation of cache contexts.
If you want to use the mobile_detect cache contexts to vary the content served to anonymous users, "Internal Page Cache" must be disabled, and the performance impact that entails incurred.
{% if is_mobile() %}
<div>mobile</div>
{% else %}
<div>not mobile</div>
{% endif %}
Active
3.0
Documentation
I also have the same problem, have you solved it? I can't see any content on my mobile device either.
{% if is_mobile() %}
{% endif %}