开发者

how to make website compatibility for mobiles as well as pc's

i searched on net for web apps compatibility on mobile and pc browser finally i decided.make 2 websites one is for mobile browser and other is for pc browser.how to find out requested is mobile or pc and how to redirect website for mobile or pc.

If there is any other way for compatibilit开发者_StackOverflow中文版y.Please let me know and give your good suggestion for this

Thanks in advance


Well, actually you can do it in different ways. The best solution is some script which checks the UserAgent first. I kow, its not that save, 'cause its easy to change the agent but why should someone do it and with which benefit of it ;) So this should be your solution. Also you can optimize the websites to the specfic target device/browser. For example, for devices like iPhone, Android or WinMob you ould use Javascript Frameworks to work withthe website content.

I made a little post on another question which could help you aswell: Is there an equivilent of jQTouch that covers iPhone, Android, WebOS and Blackberry OS?


This is not as simple as one may think.

First, determine if the web app is accessed from a mobile device is not easily done. What is a mobile device? Is iPad a mobile device? Should all devices with a resolution less than 1024*768 be handled as "mobile devices"?

Second, designing a web application to make it compatible for all different devices - which in turn can have many different browsers installed - is not a piece of cake.

But fortunately there are some solutions as well.

  • There is WURFL - http://wurfl.sourceforge.net/ - which is an open source alternative.

  • Device Atlas - http://deviceatlas.com/ - a commercial alternative.

  • Mobizoft C4M - http://mobizoft.com/ - another commercial alternative with both an API as well as some prepackaged solutions.

  • Wordpress mobile pack - http://wordpress.org/extend/plugins/wordpress-mobile-pack/

Any of them can be used to switch a mobile device to a special mobile adapted site. They can also be used to build/adapt a mobile friendly site, depending on what you need.

When you have built an mobile friendly site you should first of all test it devices with different resolutions/os/browsers. Another useful site is http://mobiready.com where you can validate the site.

A final tip is to consider which devices to support. Only iPhone/Android? Maybe have a full version for these devices and a simpler version for all other devices. Depends what your requirements are.

Good luck!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜