<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:series="http://unfoldingneurons.com/"
> <channel><title>Comments on: iPhone &amp; iPod Detection Using&#160;JavaScript</title> <atom:link href="http://davidwalsh.name/detect-iphone/feed" rel="self" type="application/rss+xml" /><link>http://davidwalsh.name/detect-iphone</link> <description>Legendary scribbles about JavaScript, HTML5, AJAX, PHP, CSS, and ∞.</description> <lastBuildDate>Thu, 09 Feb 2012 02:40:12 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3</generator> <item><title>By: Brandon Crooks</title><link>http://davidwalsh.name/detect-iphone/comment-page-1#comment-27503</link> <dc:creator>Brandon Crooks</dc:creator> <pubDate>Tue, 08 Nov 2011 17:12:49 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=1462#comment-27503</guid> <description>I agree. Sometimes the water&#039;ed down version of a site dramatically reduces usability. I&#039;m pretty sure you can implement a link to redirect to a page without mobile redirection.</description> <content:encoded><![CDATA[<p>I agree. Sometimes the water&#8217;ed down version of a site dramatically reduces usability. I&#8217;m pretty sure you can implement a link to redirect to a page without mobile redirection.</p> ]]></content:encoded> </item> <item><title>By: chris</title><link>http://davidwalsh.name/detect-iphone/comment-page-1#comment-27329</link> <dc:creator>chris</dc:creator> <pubDate>Sun, 23 Oct 2011 11:03:06 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=1462#comment-27329</guid> <description>I&#039;ve searched for hours for different ways of detecting browsers:
As a designer with limited knowledge of javascript and php, this has been the only example I&#039;ve found that makes sense and actually works. Thank you for your rare ability to explain code that i now understand and actually works for me. (I dont care if php is better, I cant get it to work and is therefore useless to me, if you want to get high and mighty, with php, write an understandable tutorial and then maybe non geeks will use it)</description> <content:encoded><![CDATA[<p>I&#8217;ve searched for hours for different ways of detecting browsers:<br
/> As a designer with limited knowledge of javascript and php, this has been the only example I&#8217;ve found that makes sense and actually works. Thank you for your rare ability to explain code that i now understand and actually works for me. (I dont care if php is better, I cant get it to work and is therefore useless to me, if you want to get high and mighty, with php, write an understandable tutorial and then maybe non geeks will use it)</p> ]]></content:encoded> </item> <item><title>By: Amber Mejias</title><link>http://davidwalsh.name/detect-iphone/comment-page-1#comment-27323</link> <dc:creator>Amber Mejias</dc:creator> <pubDate>Fri, 21 Oct 2011 17:11:26 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=1462#comment-27323</guid> <description>Thanks a million. It took me two days just to find this fix. :o)</description> <content:encoded><![CDATA[<p>Thanks a million. It took me two days just to find this fix. :o)</p> ]]></content:encoded> </item> <item><title>By: Okto</title><link>http://davidwalsh.name/detect-iphone/comment-page-1#comment-27190</link> <dc:creator>Okto</dc:creator> <pubDate>Sat, 08 Oct 2011 20:52:51 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=1462#comment-27190</guid> <description>I prefer css media, but this snippet help me to much for hiding toolbar in IOS, and not in the browsers users, preventing the user lose the point of the site when refreshing or sending a form.&lt;code&gt;
if((navigator.userAgent.match(/iPhone/i)) &#124;&#124; (navigator.userAgent.match(/iPod/i))) { //if IOS do this things:
window.addEventListener(&#039;load&#039;, function() {
setTimeout(scrollTo, 0, 0, 1);
}, false);
}
&lt;/code&gt;</description> <content:encoded><![CDATA[<p>I prefer css media, but this snippet help me to much for hiding toolbar in IOS, and not in the browsers users, preventing the user lose the point of the site when refreshing or sending a form.</p><p><code><br
/> if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) { //if IOS do this things:<br
/> window.addEventListener('load', function() {<br
/> setTimeout(scrollTo, 0, 0, 1);<br
/> }, false);<br
/> }<br
/> </code></p> ]]></content:encoded> </item> <item><title>By: Okto</title><link>http://davidwalsh.name/detect-iphone/comment-page-1#comment-27189</link> <dc:creator>Okto</dc:creator> <pubDate>Sat, 08 Oct 2011 20:51:35 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=1462#comment-27189</guid> <description>I prefer css media, but this snippet help me to much for hiding toolbar in IOS, and not in the browsers users, preventing the user lose the point of the site when refreshing or sending a form.if((navigator.userAgent.match(/iPhone/i)) &#124;&#124; (navigator.userAgent.match(/iPod/i))) { //if IOS do this things:
window.addEventListener(&#039;load&#039;, function() {
setTimeout(scrollTo, 0, 0, 1);
}, false);
}</description> <content:encoded><![CDATA[<p>I prefer css media, but this snippet help me to much for hiding toolbar in IOS, and not in the browsers users, preventing the user lose the point of the site when refreshing or sending a form.</p><p>if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) { //if IOS do this things:<br
/> window.addEventListener(&#8216;load&#8217;, function() {<br
/> setTimeout(scrollTo, 0, 0, 1);<br
/> }, false);<br
/> }</p> ]]></content:encoded> </item> <item><title>By: Bernie</title><link>http://davidwalsh.name/detect-iphone/comment-page-1#comment-26897</link> <dc:creator>Bernie</dc:creator> <pubDate>Thu, 15 Sep 2011 20:44:40 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=1462#comment-26897</guid> <description>Hello David,why in all mobile site their domain starts with &quot;m&quot; like m.mysite.com is that only a subdomain or once the site run in mobile phones the &quot;m&quot; will automatically replace the www.Thanks</description> <content:encoded><![CDATA[<p>Hello David,</p><p>why in all mobile site their domain starts with &#8220;m&#8221; like m.mysite.com is that only a subdomain or once the site run in mobile phones the &#8220;m&#8221; will automatically replace the www.</p><p>Thanks</p> ]]></content:encoded> </item> <item><title>By: David</title><link>http://davidwalsh.name/detect-iphone/comment-page-1#comment-26348</link> <dc:creator>David</dc:creator> <pubDate>Thu, 04 Aug 2011 15:07:10 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=1462#comment-26348</guid> <description>Wow! It works perfectly!</description> <content:encoded><![CDATA[<p>Wow! It works perfectly!</p> ]]></content:encoded> </item> <item><title>By: Darren</title><link>http://davidwalsh.name/detect-iphone/comment-page-1#comment-24208</link> <dc:creator>Darren</dc:creator> <pubDate>Wed, 25 May 2011 12:03:58 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=1462#comment-24208</guid> <description>This method works great - I use it for www.digisolved.com and it works great!</description> <content:encoded><![CDATA[<p>This method works great &#8211; I use it for <a
href="http://www.digisolved.com" rel="nofollow">http://www.digisolved.com</a> and it works great!</p> ]]></content:encoded> </item> <item><title>By: webworks</title><link>http://davidwalsh.name/detect-iphone/comment-page-1#comment-23598</link> <dc:creator>webworks</dc:creator> <pubDate>Sun, 17 Apr 2011 21:35:11 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=1462#comment-23598</guid> <description>indeed PHP is much better for user-agents detect... avoiding redirects or links altering.. like mobile.domain.com .. or domain.com/mobile .But as @Omari said .. or for those who do not use/have PHP available .. or any other serverside, javascript is a good idea.Also .. to be helpfull here are some other mobile extentions that would help.&lt;code&gt;match(/android/i)
match(/opera mini/i)
match(/blackberry/i)
match(/(pre\/&#124;palm os&#124;palm&#124;hiptop&#124;avantgo&#124;plucker&#124;xiino&#124;blazer&#124;elaine)/i)
match(/(iris&#124;3g_t&#124;windows ce&#124;opera mobi&#124;windows ce; smartphone;&#124;windows ce; iemobile)/i&#039;)&lt;/code&gt;also .. for PHP .. use preg_match instead of strstr ... is faster</description> <content:encoded><![CDATA[<p>indeed PHP is much better for user-agents detect&#8230; avoiding redirects or links altering.. like mobile.domain.com .. or domain.com/mobile .</p><p>But as @Omari said .. or for those who do not use/have PHP available .. or any other serverside, javascript is a good idea.</p><p>Also .. to be helpfull here are some other mobile extentions that would help.</p><p><code></p><p>match(/android/i)<br
/> match(/opera mini/i)<br
/> match(/blackberry/i)<br
/> match(/(pre\/|palm os|palm|hiptop|avantgo|plucker|xiino|blazer|elaine)/i)<br
/> match(/(iris|3g_t|windows ce|opera mobi|windows ce; smartphone;|windows ce; iemobile)/i')</p><p></code></p><p>also .. for PHP .. use preg_match instead of strstr &#8230; is faster</p> ]]></content:encoded> </item> <item><title>By: Darren</title><link>http://davidwalsh.name/detect-iphone/comment-page-1#comment-23111</link> <dc:creator>Darren</dc:creator> <pubDate>Tue, 15 Mar 2011 23:34:19 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=1462#comment-23111</guid> <description>I&#039;m having a bit of trouble with this. I put the code in the head of my main website (the desktop version). And went into the CP of my hosting provider and created a subdomain (the domain for the web version). I directed it to look into a specific folder for the files and when I go to the url it redirects me like it should to the web version but all the css, javascript, images (basically any links) have been stripped and don&#039;t work/appear at all.Anyone have any ideas?</description> <content:encoded><![CDATA[<p>I&#8217;m having a bit of trouble with this. I put the code in the head of my main website (the desktop version). And went into the CP of my hosting provider and created a subdomain (the domain for the web version). I directed it to look into a specific folder for the files and when I go to the url it redirects me like it should to the web version but all the css, javascript, images (basically any links) have been stripped and don&#8217;t work/appear at all.</p><p>Anyone have any ideas?</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 1/22 queries in 0.006 seconds using disk: basic
Object Caching 858/876 objects using disk: basic

Served from: davidwalsh.name @ 2012-02-09 00:34:05 -->
