Log in

View Full Version : Mobile Browser Detection


lonesniper
01-10-2005, 10:58 PM
I am sure this has been mentioned on the forum before but I just can't seem to find it now. Also a google search has turned up blank for me. I may not be searching for the right phrase.

I am looking for code to put on my website's main page that will detect a user with a mobile browser and then automatically redirect them to a special page formatted for small screens. Just like this site does.

I am not a HTML wiz so any help you can offer is greatly appreciated.
Thanks.

Colin

Wiggster
01-10-2005, 11:03 PM
Do you want to do this in a normal web page (ie, only HTML and Javascript), or are you planning to use a server-side method, such as PHP? Either way, you might want to check out this thread (http://www.pocketpcthoughts.com/forums/viewtopic.php?t=15385).

lonesniper
01-11-2005, 12:14 AM
Thanks that was the forum post I was trying to find.
My default page is index.php and is created by the blogging software I use. I have added the javascript code to the top and will test it out. I now just have to work out how to create a blog page without the redirect code so mobile browsers can view the full site if needed

I doubt anyone will visit my blog on a mobile device this is just one of those W?BIC! things you have to do. :)