Back

WordPress Hosting – Mobile Caching

1 December 2016

Tim Nash

Caching is one of the main tools we use to improve performance on our hosting systems, and over the last few months we’ve been slowly rolling out changes to improve the caching on our WordPress Hosting platform.

On our WordPress Hosting platform we use Nginx FastCGI; this creates a cached version of website pages the first time they are accessed by a visitor. Subsequent visitors to the site are then given this cached page. This means that expensive and slow processes such as talking to the database server or generating the page from scratch with PHP can be skipped entirely. The result is dramatically less load on your container and blazing fast load speeds for visitors.

One issue with the platform previously has been customising exactly which visitors see cached content so over the the last few months we’ve been making changes to our interface to allow more control for end users. For developers we have also rolled out a way for plugins & themes to tell Nginx not to cache specific pages.

Another recent change has also corrected an issue with mobile and desktop caching, both of which may differ. Previously, plugins such as wp-touch may have inadvertently presented desktop visitors with a mobile cached version of a site, if the cache was generated by a previous mobile visitor.

Our recent changes correct this issue – mobile users will now see the mobile version of your site while desktop users will see the correct desktop versions. You don’t need to do anything to enable mobile caching on your site; this feature is already enabled on all WordPress Hosting containers and domains on our WordPress platform. If you don’t use plugins like wp-touch or similar, don’t worry; having this extra set of caches should not affect performance and caches themselves are fixed in size so no extra space will be taken up within the container.

To achieve this, behind the scenes we work out which version of the cache should be shown by looking at the user agent, a string sent by every browser to the server, to announce itself. We then compare the user agent against our regularly updated list to see if the visitor might be using a mobile device. While this might seem tricky in theory – there are thousands of makes and models of mobile handsets – most mobile device browsers user agents use common names, making the process relatively simple. If you do see an incorrect page delivered to your desktop or mobile, please contact our support team so we can review how you’re accessing your site and make the relevant tweaks.