WordPress not quite ready for mobile browsing

Instead of redacting this entire entry, I’ll let you know that mobile browsing for WordPress does work now. See my updated article on The Evolutionary Process of Mobile Browsing on WordPress for more details.


One of my design goals for revision 3 of SilverPen Publishing was to make the site more accessible. I’m not a web developer by trade and didn’t really know how to do this, but I knew that I didn’t want to exclude people from visiting my corner of the web. To me, this didn’t just mean making SilverPen more friendly to screen readers and other assistive technology devices, but also to make the site work well on mobile devices.

To this end, I found yet another great plugin by Alex King that queries the user agent of the browser trying to access the site. If it’s a mobile web browser, the plugin serves up a custom template that’s very lightweight and fast to load on mobile devices. It worked very well, but unfortunately it only worked in a vaccuum, and even then had some serious repercussions.

WP Super Cache

First off, it simply does not work with WP Super Cache, and in fact, no mobile browsing solution does. For those who haven’t heard of Super Cache, I’ll explain what it does and why it’s necessary very briefly. Every blog post and page that WordPress serves up is dynamically generated on the fly when you access the site. Putting all the pieces together to make a web page puts a lot of load on the server, and it makes the page load a lot slower for you. Caching allows the server to create static pages, rather than dynamic ones, of the same content and therefore serve it up faster. This reduces load on the server and makes the page load a whole lot fast for you.

Because of how WordPress works, this caching is pretty much vital to running a site on WordPress. My traffic’s not that high yet, but it has more than doubled in the last few months, and I expect it to continue increasing at a similar rate. The last thing I need is Bluehost freezing my site temporarily due to a sudden spike of traffic, so like all good WordPress bloggers, I use WP Super Cache.

To make a long story short, WP Super Cache creates a copy of a page the first time someone visits it. Each subsequent visitor is shown that copy, and this is what breaks WordPress Mobile Edition. Since you’re viewing a static copy of the page that has already been generated, you don’t see the mobile theme, rendering the mobile plugin useless.

If it’s a choice between having the page load more quickly for most everyone and reducing the load on my server vs. having the site more accessible on mobile devices, I’m going to have to go with the former. Especially as data plans move towards 3g and faster mobile browsing.

Search Engine de-Optimization

The second reason that mobile browsing fails for WordPress is because it kills SEO, which harms your ranking in search engines. By its very nature of essentially serving a different set of pages to mobile devices, plugins such at WordPress Mobile Edition fool search engine robots into thinking there’s a second website with duplicate content on it. Such duplicate content is ranked down by search engines, which means your pages are less likely to turn up in searches and you’ll get less traffic.

The mobile plugins and solutions for WordPress all admit that it’ll kill your SEO and recommend you “do something” about it, but don’t offer many solutions. I thought I had found an elegant work-around yesterday in the form of themed multiple domains in WordPress, which would allow me to have multiple domains pointing at a single instance of WordPress, wich each domain triggering its own theme. In this instance, you can easily redirect robots that hit those other domains to a separate robots.txt file, which would tell them “don’t index this site.” For example, if I had silverpenpub.net and m.silverpenpub.net (for mobile browsers), I could have the main site indexed and tell the robots not to index the mobile site.

But I don’t want to register a separate domain for mobile browsers, and I couldn’t get it to work with a subdomain for some reason. Maybe I was doing something wrong there and will figure it out eventually, but it’s not going to happen today.

Not worth my time

In the end, trying to twist WordPress into working on mobile devices doesn’t give a  lot of return for the investment, and I’m beginning to think it will be a non-issue before too long. Even I am beginning to dream nightly of acquiring an iPhone, and browsing with a 3g connection means that, even over a cellular data plan, you can load a site quickly. And newer phones have a lot larger screens, which means that my theme displays fine all on its own.

I know that WordPress now has a iPhone-friendly administrative interface, and I hope that they include more features in the future to help their platform run better on mobile devices. Accessibility is still important to me, but I can’t justify 5-10+ hours of work to make the site more accessible to 0.5% of readers by introducing “features” that degrade or break the site for the other 99.5%.

5 thoughts on “WordPress not quite ready for mobile browsing

  1. The latest release of WP Super Cache has hooks in it that would allow plugin developers to customize the cached blog page based on their own plugin’s criteria.

    In “half on” mode, It would be easy enough to write a plugin that checked the user agent string for the iphone and served a different cache file. In full on static caching mode, the blog author would have to modify the mod_rewrite rules manually and add in those user agent checks.

    I hinted at this in my announcement post here: http://ocaoimh.ie/2008/11/25/wordpress-mu-265/ but nobody seems to have picked up on it.

  2. Thanks for commenting, Donncha. It’s an honour to have you on my site!

    While I can understand the concept of what you’re saying, I’m not certain I am capable of writing such a thing myself. Regarding serving a separate cache file, I’d wonder how you address the issue of search engines indexing the second cache as duplicate material; Milorad seems to provide a potential solution to this, but I haven’t gotten it to work yet.

    If I can figure out how to modify something like WordPress Mobile Edition to 1) Set up a separate cache for mobile devices, 2) Automatically edit .htaccess to input the UA strings for mobile devices, and 3) Automatically edit robots.txt and/or setup a separate robots.txt file to prevent indexing of the mobile cache, I’ll certainly let you know… In fact, if I could even figure out how to do it without a plugin, I’d write about it. But I’m not altogether certain that’ll happen anytime soon 😛

  3. Finding time and knowledge is more the issue 😛 Work has me beginning a pilot project to implement a Virtual Computing Lab, so wrapping my head around other things is going to be pretty difficult for the next 6-12 months.

    Thanks for following up on this; I feel like you and Alex are something like rock stars in the WordPress community, and I’m always hesitant to approach such people directly. I have a great deal of respect and appreciation for the work both of you do and hate to imply that it’s not sufficient :- (Because it is! Sufficient and wonderful, that is.)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s