<p>What is iPhone's browser tag and how iPhone optimized web site is different from a usual mobile web site?</p>

<p>Thanks!</p>

[{'answer_id': 52570, 'author': 'Espen Herseth Halvorsen', 'author_id': 1542, 'author_profile': 'https://Stackoverflow.com/users/1542', 'pm_score': 2, 'selected': True, 'text': '<p>Nettuts has a great introduction to web-developement for iPhone. You find it <a href="http://nettuts.com/misc/learn-how-to-develop-for-the-iphone/" rel="nofollow noreferrer">here</a></p>\n\n<p>This is the specific code you asked for (taken from that article):</p>\n\n<pre><code>&lt;!--#if expr="(${HTTP_USER_AGENT} = /iPhone/)"--&gt;   \n\n&lt;!--  \nplace iPhone code in here  \n--&gt;   \n\n&lt;!--#else --&gt;   \n\n&lt;!--  \n    place standard code to be used by non iphone browser.   \n--&gt;   \n&lt;!--#endif --&gt; \n</code></pre>\n'}, {'answer_id': 52579, 'author': 'Jason Cohen', 'author_id': 4926, 'author_profile': 'https://Stackoverflow.com/users/4926', 'pm_score': 1, 'selected': False, 'text': '<p>Apple defines the user agent <a href="http://developer.apple.com/documentation/AppleApplications/Reference/SafariWebContent/OptimizingforSafarioniPhone/chapter_3_section_3.html" rel="nofollow noreferrer">here</a>.</p>\n\n<p>This field is transmitted in the HTTP headers under the key "User-Agent"</p>\n'}, {'answer_id': 54369, 'author': 'Tim Farley', 'author_id': 4425, 'author_profile': 'https://Stackoverflow.com/users/4425', 'pm_score': 2, 'selected': False, 'text': '<p>Apple has some excellent guidelines for iPhone web page development here:</p>\n\n<p><a href="http://developer.apple.com/documentation/AppleApplications/Reference/SafariWebContent/Introduction/chapter_1_section_1.html#//apple_ref/doc/uid/TP40002079-SW1" rel="nofollow noreferrer">Safari Web Content Guide for iPhone</a></p>\n\n<p>From my brief reading of it, here are a key elements to look out for:  </p>\n\n<ul>\n<li>The way the "viewport" and scrolling works is a bit different due to the small screen size. There are custom META tags that let you adjust this automatically when someone comes to your page.</li>\n<li>Beware pages that use framesets or other features that require the user to scroll different elements on the page, because the iPhone does not display scrollbars.  </li>\n<li>If you expect people to bookmark your page on the iPhone, there\'s a custom META tag that lets you specify a 53x53 icon that will look nicer than the typical favorite.ico.</li>\n<li>Avoid javascript that depends on mouse movement or hover actions to make things happen, they won\'t work right on iPhone.</li>\n<li>There are some custom CSS properties that allow you to adjust text size and highlight color of hyperlinks on the iPhone.</li>\n<li>There are other key HTML/Javascript features that they tell you to either favor or avoid as well.</li>\n</ul>\n'}, {'answer_id': 3119990, 'author': 'Jimit', 'author_id': 317834, 'author_profile': 'https://Stackoverflow.com/users/317834', 'pm_score': 0, 'selected': False, 'text': '<p>Better Solution:</p>\n\n<pre><code>*\n\n  (NSString *)flattenHTML:(NSString *)html {\n\n  NSScanner *theScanner; NSString *text = nil;\n\n  theScanner = [NSScanner scannerWithString:html];\n\n  while ([theScanner isAtEnd] == NO) {\n\n  // find start of tag\n  [theScanner scanUpToString:@"&lt;" intoString:NULL] ; \n\n\n  // find end of tag\n  [theScanner scanUpToString:@"&gt;" intoString:&amp;text] ;\n\n\n  // replace the found tag with a space\n  //(you can filter multi-spaces out later if you wish)\n  html = [html stringByReplacingOccurrencesOfString:\n                     [ NSString stringWithFormat:@"%@&gt;", text]\n               withString:@" "];\n\n  } // while //\n\n  return html;\n</code></pre>\n\n<p>}</p>\n'}]
['https://Stackoverflow.com/questions/52561', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4808/']