Getting W3 Total Cache and a mobile plugin to work in WordPress

W3 Total Cache and WordPress Mobile Pack configuration

Since release 0.9.0 W3 Total Cache has an excellent mobile support. The author has done a great job with this update and now it works smoothly. Different mobile plugins or themes might require some slightly settings, but the default should work for most cases.

Configuring WordPress Mobile Pack
Continue reading “Getting W3 Total Cache and a mobile plugin to work in WordPress”

Making Super Cache and mobile work well

If you are using WordPress for anything critical beyond your local football team, then you know that the use of a cache plugin is a must.

WP Super Cache is the best known cache plugin, if not the most famous plugin of all. Initially it did not play well with admins that also wanted a mobile presence and it is very simple to explain, the whole purpose of the cache is to generate the file dynamically once, store it and then serve it again without any further computation. As the years went by, mobile became more important and WP Super Cache integrated a basic mobile support. Recently donncha introduced a fundamental new feature, the ability for other plugins to define actions. I will not go into the details of how this works and what you can do, you can read all of it on the WordPress site.
Continue reading “Making Super Cache and mobile work well”

Code snippet of the day

Sometimes working late has some side-effects. The other day I had a problem with a PHP script that should have taken 1 or 2 seconds to run and instead seemed to hang the webserver. Eventually I found the issue:


while ( $variable ) {
if ( $a == $b )
echo "do something";
}

Ermm… for some reason I never changed the value of $variable and of course the loop became infinite.

WURFL PHP tools Version 2.1 released

Dear WURFL users I am here announcing the release of the PHP library version 2.1 Final (changelog). This release has been sitting there for quite a few months, it includes the patches I received, includes the new debug feature that was introduced in Beta 3 and a few more tweaks.
browser_is_wap has been there from day 1, but in the last year or so has proved to be outdated. The property is still there, but I strongly suggest that you use the WURFL capabilities (is_wireless_device and device_claims_web_support). The property now gets values from the WURFL capability is_wireless_device when available, just like Tera-WURFL. If you want real web/mobile distinction, I suggest you get the web patch.

The only major issue that I fixed is the exact matching that sometimes did not happen in specific circumstances.

I know I had promised to add the multiple patch support, but it never arrived. If you want to implement it should really take something between 5 and 10 lines of code.

This is my last release of the library, as you know I will not be active in the WURFL project anymore. At the same time I don’t see much space of evolution for this library. If you are unhappy with the speed of this release, you should probably give a try to Tera-WURFL, if you are unhappy with PHP 4 and want PHP 5, you should probably re-write it from scratch. For these reasons, I believe this is the last release. If anyone has an issue and wants to contact me, feel free, if you want to pick it up, I’ll be happy to see it keep living. MPL 1.1 gives you the freedom of picking it, just play nice with the license rules.

Hopefully there will not be release-time bugs. :)