Mobile Detection and Redirection using the HandSetDetection API

Me and the boys at DealerTrend have been trying to provide a scalable solution for mobile sites to our clients. We’d experimented with the many plugins available in the WordPress repository and most of them made the following mistakes.

  • Do all the running all the logic server side, which means caching is no longer possible via a proxy server.
  • Rendering the new content under the same domain. In essence restructuring an entire sites markup and outputting the new content. This could be seen as duplication within the same product.
  • Use static formulas for user agent detection.

Let’s take a look at the reasons I think these are mistakes.

First, running the logic on the server side produces an outcome…if that outcome is cached then someone else will see that outcome even if it doesn’t fit their situation. This means you can’t cache from an external server, it has to be done at the object level within WordPress. Which may not be ideal given that WordPress is using MySQL and in some cases, Apache which can only handle a (relatively) small load.

Continue reading