I thought I would add something to this blog that is linked to rather than to do with HTML and CSS; responsive web design. I'll explain:
Whilst there are many different ways of designing a responsive website, there will be times where it just won't do.
I recently designed a website for a client where I suggested a completely different approach to their mobile site compared to their desktop equivalent, for two reasons:
1. It is a very text heavy website, so the same amount of information needed to be punchy and in bite size chunks.
2. We wanted the customer journey to lead straight to a "call to action".
(2a. after doing some research we found that people who where visiting websites on their mobile devices are more likely to "call to action" than people on the desktop because they are looking for something specific, at that moment, especially when out and about.)
So the desktop site is a regular responsive website which adapts to the different variations of screen sizes as does the mobile site, only it is better suited for mobile devices.
We decided the best approach would be to have the desktop site at the main root domain and the mobile site at a subdomain.
Now I tried a few different redirects but the one that seemed to work was the a javascript version.
That worked for some devices but not others, this was because some mobile devices (I'm looking at you Samsung) aren't recognised as mobile browsers.
The solution was to put this into .htaccess file
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteCond %{HTTP_HOST} !^m.yourwebsite.co.uk
RewriteRule ^(.*)$ http://m.yourwebsite.co.uk/ [L,R=302]
Where it mentions user agent you can add additional devices, like ipad, just separate them with a bar as shown above.
Note: with the iOS devices you can specify which devices to target with android you can't so even android tablets will end up with the mobile version. Which is not something we wanted, but have had to compromise on.