Title: Moblie detect
Last modified: August 24, 2016

---

# Moblie detect

 *  [Viktor Szépe](https://wordpress.org/support/users/szepeviktor/)
 * (@szepeviktor)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/moblie-detect/)
 * Please consider supporting page caches.
    When the page cache is empty and the
   first visitor comes, the page gets cached. And – this is the problem – every 
   other visitor gets the cached version of the page.
 * I don’t know what should `ismobile` do then. Mobile?? Desktop??
 * [https://wordpress.org/plugins/custom-content-shortcode/](https://wordpress.org/plugins/custom-content-shortcode/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * (@miyarakira)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/moblie-detect/#post-6060496)
 * This is outside the control of the mobile detect module – it depends on the cache
   plugin that you’re using. Some of them have a feature to detect user devices.
 * It is possible to cache the pages manually like this:
 *     ```
       [is mobile]
         [cache name="mobile_page" expires="1 day"]
           ...content for mobile..
         [/cache]
       [else]
         [cache name="non_mobile_page" expires="1 day"]
           ...content for non-mobile..
         [/cache]
       [/is]
       ```
   
 *  Thread Starter [Viktor Szépe](https://wordpress.org/support/users/szepeviktor/)
 * (@szepeviktor)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/moblie-detect/#post-6060526)
 * Thank you!
 * Could it be that the cache shortcode has no reference tab?
    /options-general.
   php?page=ccs_reference&tab=cache
 *  Plugin Author [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * (@miyarakira)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/moblie-detect/#post-6060538)
 * Hello,
 * Currently the only way to see the reference page for [cache] is from the Overview.
   So the tab exists, but not easy to find.. It’s actually the same for the new [
   block] shortcodes I added, you can only reach the documentation from the Overview
   or Settings page. I’ve been thinking how to solve this – right now, there is 
   maximum number of visible tabs that fit horizontally. So, I need a different 
   way to organize the reference sections.
 * About mobile detect and caching: I recently had the same issue – in one project
   I was using mobile detect to serve different layouts, but any caching plugin 
   would cache the page _before_ the device detection, and only served the same 
   cached page for all visitors.
 * So, server-side device detection doesn’t work with most caching plugins – some
   provide a way around it. In my case, I had to use client-side detection using
   JavaScript, which comes _after_ the cached page is loaded.
 * Another way to achieve mobile detect and caching, is to manually cache page sections,
   as suggested above. It depends on the use case, if this is a practical thing 
   to do. If you have any suggestions to improve this, please let me know.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Moblie detect’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-shortcode_766976.svg)
 * [Custom Content Shortcode](https://wordpress.org/plugins/custom-content-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-shortcode/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Eliot Akira](https://wordpress.org/support/users/miyarakira/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/moblie-detect/#post-6060538)
 * Status: not resolved