Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mobile Detect Switch doesn't work with cache on #3

Closed
sd788034 opened this issue Nov 6, 2016 · 6 comments
Closed

Mobile Detect Switch doesn't work with cache on #3

sd788034 opened this issue Nov 6, 2016 · 6 comments

Comments

@sd788034
Copy link

sd788034 commented Nov 6, 2016

No description provided.

@tabbabi
Copy link
Owner

tabbabi commented Nov 6, 2016

more details please !

@sd788034
Copy link
Author

sd788034 commented Nov 6, 2016

little bit complicated... could you please check this site: http://th-yh.weshare100.com

it should work as using different code in desktop/mobile browser.

it works fine every time i clear the cache. but after the cache is built, it only shows the version cached...

my code is like below

{% if is_mobile() %}
    <div class="m-all" name="index">
        <header class="header">
some code
        </header>
            <div class="design-nav">
            {{ page.menu_mobile }}
            </div>
    </body>
<script type="text/javascript">
some code
</script>
{% else %}
        <!--header-->
        <header id="front-header">
some code
        </header>

<div class="container">
    <div class="swiper-container" id="design-swiper-change">
        <div class="swiper-wrapper">
                {{ page.front_slider }}
        </div>
        <div class="swiper-pagination"></div>
        <div class="swiper-button-prev"></div>
                     <div class="swiper-button-next"></div
    </div>
</div>
<script type="text/javascript">
some code
</script>

{% endif %}

@sd788034
Copy link
Author

sd788034 commented Nov 6, 2016

English is not my native language... (Chinese here :)))

plz let me know if u can't understand...

@sd788034
Copy link
Author

now i switch off all the cache, the code works fine.

@cta-xx
Copy link

cta-xx commented Nov 11, 2016

Hi! Yes, the module isn't working when Drupal cache is enabled.

@sd788034
Copy link
Author

sd788034 commented May 1, 2017

@cta-xx THX

@sd788034 sd788034 closed this as completed May 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants