March 22, 2012

build website handheld device friendly

Question by Shruti Jakhete

I want to adapt a method to convert my fixed width website to handheld device friendly website. Could anybody please suggest which method would be the best. Considering it should not compromise the loading time of website. I believe Responsive Web Design should work but I from research I found responsive images used in responsive webdesign sometimes compromise the websie loading time.

Answer by Starx

I think it is wise to detect a mobile browser user agent string (server side) and display content accordingly.

If you are building using PHP, then check out this awesome script.

Usage is something like this:

if($isMobile){
   header('Location: http://m.youdomain.com/' . urlencode($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']));
   exit();
}

Also check out the Switcher

...

Please fill the form - I will response as fast as I can!