Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you can avoid it, don't bypass the cache for any blocks. It will improve your user experience in the log run. However, there's a few ways you could tackle this issue.</p> <p>I've blogged <a href="http://mikebywaters.wordpress.com/2011/12/14/disable-magento-full-page-cache-on-a-per-controller-basis/" rel="nofollow">here</a> about disabling the cache on a per controller basis. You could potentially use the same method for the moment, except with a different "if" condition.</p> <p>Where I'm checking:</p> <pre><code>if ($action instanceof &lt;controller_class_name&gt;) { </code></pre> <p>You could just as easily use:</p> <pre><code>if ($user_is_mobile == true) { </code></pre> <p>Doing it this way would only get your mobile users working in the meantime. Really, the answer isn't to disable or bypass the cache, it's to use this same method to listen for the page request and assign different layout handles for mobile and non-mobile requests. Each layout handle will then cache accordingly.</p> <p>Look into how you use handles in Layout Updates. From memory it's something like this:</p> <pre><code>Mage::app()-&gt;getLayout()-&gt;getUpdate()-&gt;addHandle("mobile"); </code></pre> <p>Then in your page.xml, add a new node called mobile, something like this</p> <pre><code>&lt;mobile&gt; &lt;reference name="root"&gt; &lt;remove name="mainHead" /&gt; &lt;block type="core/template" name="mobileHead" /&gt; &lt;/reference&gt; &lt;/mobile&gt; </code></pre> <p>Or something along those lines. This is insanely untested, but I hope you get the idea.</p> <p>You could otherwise look at using responsive css depending on screen resolution.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload