WPSC recognizes iPad as mobile
-
Hi,
We have mobile device support turned on, as well as a plugin that serves a different theme for desktop and mobile.
By default, WPSC’s list of mobile devices includes iPad – which isn’t mobile, it’s tablet, and in many cases (as in ours) gets served either its own theme or desktop.
So this creates a problem: an iPad user who visits the a page that isn’t cached, gets served a desktop version – that WCSP then stores as a mobile cached version, and then serves this to other mobile users…
I edited wp-cache.php to remove iPad, however I believe it’s something that is inherently a mistake by the coders, and I’m also unsure if there are other tablet strings that appear there.
I’d also like to suggest that you separate mobile and tablet user agents, and also urge you to allow the user agent lists to be edited in the WPSC advanced settings page.
FYI, you also have super ancient and irrelevant user agents listed there. I recommend Cloudflare’s regex match for device type detection:
- Mobile:
(?:phone|windows\s+phone|ipod|blackberry|(?:android|bb\d+|meego|silk|googlebot) .+? mobile|palm|windows\s+ce|opera\ mini|avantgo|mobilesafari|docomo)
- Tablet:
(?:ipad|playbook|(?:android|bb\d+|meego|silk)(?! .+? mobile))
- Desktop: Everything else not matched above.
Finally, I just want to verify: the change I made to super-cache.php will not be erased when/if I upgrade WPSC, correct?
Many thanks,
Bira
- Mobile:
- The topic ‘WPSC recognizes iPad as mobile’ is closed to new replies.