WP Mobile Detector, W3 Total Cache, Home Page, Blackberry Viewport, Responsive
===

I'm using WP Mobile Detector with W3 Total Cache and a responsive layout (media queries), and I'm have a few issues:

1. When I view the site locally (localhost) on a Blackberry, it looks good; the zoom/viewport is correct, media queries have trigger correctly etc. However, when I view the live site on the Blackberry, the viewport has zoomed out. In the context of a responsive layout, locally I see two columns, but on live I see all six columns (i.e. the Blackberry thinks it is a full browser - quite annoying!).

2. I thought I would deactivate W3 Total Cache to see if that was having any effect: yes, it was. When the cache is off, the viewport/zoom is good and all is well. Problem solved? Not quite...

3. With the cache off, I navigate to the live site and while the sub-pages of the site - e.g. www.SITE.com/about, www.SITE.com/contact - are responding with the mobile theme, when I click a link back to home (or type it into the address bar) - i.e. www.SITE.com/ - I'm no longer delivered the mobile theme, just the normal 'desktop' theme. If I go back to a sub-page I see the mobile theme again. What's going on there then.

4. When viewed on the Blackberry (for example), if I click the 'View Full Site' link (which triggers a Javascript function to modify the cookie) it doesn't show the full site (i.e. normal theme), it just refreshes and shows the mobile theme. However, when viewed in Firefox on the desktop (via a User Agent Switcher) the link DOES modify the cookie and switches back to the normal desktop theme.

<b>Thoughts/Questions</b>

W3TC does work with WPMD (mobile theme delivers minified JS/CSS), but maybe I haven't configured something correctly. The following two links were very useful and I have implemented the changes suggested:
--- http://snipplr.com/view/47970/wp-mobile-detector--w3-total-cache-integration/
--- http://journal.code4lib.org/articles/6223

Is this a known [Blackberry HotSpot/Internet Browser] issue? I have added the requisite meta tags in the document head to indicate viewport data, and the HandheldFriendly meta data which I understand is mainly for Blackberry purposes. As I said, it look ok with the cache switched off, excepting the home page issue.

I should say it works nicely in Firefox with the User Agent Switcher extension set to iPhone 3, and I have none of the Blackberry issues.

WPMD works by setting a cookie. This appears to be working, else I wouldn't have seen the mobile theme at all.

Does the Blackberry have a problem with the Javscript function? Not easy to tell from the phone itself - might need to drop in a JS error monitor (I was looking at one the other day).


Who'd have thought mobile dev would be so tricky!