Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to determine if a web-page is for mobile?

Should I scan for tags in the html code? Or what? What determines whether a page is optimized for mobile?

One option is to scan for tags. If so, what other tags are there?

<link rel="apple-touch-icon" href="..." />
<meta name="viewport" content="width=device-width, user-scalable=no" />

Another option is to see if the HTML returned from a mobile user-agent is smaller than the HTML returned from a desktop browser. user agent...

Any thoughts?

like image 241
TIMEX Avatar asked Jul 22 '10 07:07

TIMEX


1 Answers

One option: look for: <meta name="MobileOptimized" />

Another: <meta name="HandheldFriendly" content="true"/>

Another: doctype is either XHTML-MP or WML (or other mobile-friendlies).

like image 56
Tobiasopdenbrouw Avatar answered Nov 05 '22 00:11

Tobiasopdenbrouw