<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Scott Rockers&#039; Blog &#187; Detection</title>
	<atom:link href="http://scottrockers.com/blog/tag/detection/feed" rel="self" type="application/rss+xml" />
	<link>http://scottrockers.com/blog</link>
	<description>Website Designer and Developer, Flash, Wordpress, jQuery, and Other Scripts</description>
	<lastBuildDate>Mon, 22 Aug 2011 21:48:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to Detect Android and Redirect to Android Version Website</title>
		<link>http://scottrockers.com/blog/resources/simple-code-tricks/how-to-detect-android-and-redirect-to-android-version-website</link>
		<comments>http://scottrockers.com/blog/resources/simple-code-tricks/how-to-detect-android-and-redirect-to-android-version-website#comments</comments>
		<pubDate>Tue, 22 Feb 2011 17:06:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Simple Code Tricks]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[Detection]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[redirect script]]></category>

		<guid isPermaLink="false">http://scottrockers.com/blog/?p=1185</guid>
		<description><![CDATA[I have been posting redirect scripts for several devices such as the iphone and ipad, and I thought why not add android to the list. I own a android phone and I love it, and I have tested this script so I know it works. This code detects whether the person viewing your website is [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://scottrockers.com/blog/wp-content/uploads/2011/02/android-phone.jpg" alt="android-phone" title="android-phone" width="316" height="473" class="aligncenter size-full wp-image-1192" /></p>
<p>I have been posting redirect scripts for several devices such as the iphone and ipad, and I thought why not add android to the list. I own a android phone and I love it, and I have tested this script so I know it works. This code detects whether the person viewing your website is on a <a href="http://developer.android.com/index.html" title="android">Android</a> device. If they are on a Android phone, you can redirect them to a android version website or just to another page, its up to you. If they are on a normal computer it doesn&#8217;t redirect them and they go on as normal. Its just some simple javascript, and if you want to use it just change the &#8220;document.location&#8221; value to the url you want them redirected. Here is the code, and its just the same as when you <a href="http://scottrockers.com/blog/resources/simple-code-tricks/how-to-detect-iphone-and-redirect-to-iphone-version-website" title="detect iphone">detect for iPhone</a>.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span> <span style="color: #006600; font-style: italic;">// &lt;![CDATA[</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span>navigator.<span style="color: #660066;">userAgent</span>.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Android'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		document.<span style="color: #660066;">location</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://www.yoururladdress.com/yourpage.html&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// ]]&gt;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>Cya</p>
]]></content:encoded>
			<wfw:commentRss>http://scottrockers.com/blog/resources/simple-code-tricks/how-to-detect-android-and-redirect-to-android-version-website/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>How to Detect iPad and Redirect to iPad Version Website</title>
		<link>http://scottrockers.com/blog/resources/simple-code-tricks/how-to-detect-ipad-and-redirect-to-ipad-version-website</link>
		<comments>http://scottrockers.com/blog/resources/simple-code-tricks/how-to-detect-ipad-and-redirect-to-ipad-version-website#comments</comments>
		<pubDate>Tue, 02 Feb 2010 21:05:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Simple Code Tricks]]></category>
		<category><![CDATA[Detection]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://scottrockers.com/blog/?p=868</guid>
		<description><![CDATA[With all the buzz about the iPad, I wanted to post another useful snippet of code. It detects whether the person viewing your website is on a iPad. If they are on a iPad, you can redirect them to a iPad version website or just to another page, its up to you. If they are [...]]]></description>
			<content:encoded><![CDATA[<p>With all the buzz about the <a href="http://www.apple.com/ipad/">iPad</a>, I wanted to post another useful snippet of code. It detects whether the person viewing your website is on a iPad. If they are on a iPad, you can redirect them to a iPad version website or just to another page, its up to you. If they are on a normal computer it doesn&#8217;t redirect them and they go on as normal. Its just some simple javascript, and if you want to use it just change the &#8220;document.location&#8221; value to the url you want them redirected. Here is the code, and its just the same as when you detect for the iPhone with an extra argument.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span> <span style="color: #006600; font-style: italic;">// &lt;![CDATA[</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>navigator.<span style="color: #660066;">userAgent</span>.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'iPhone'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span>navigator.<span style="color: #660066;">userAgent</span>.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'iPod'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span>navigator.<span style="color: #660066;">userAgent</span>.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'iPad'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		document.<span style="color: #660066;">location</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://www.scottrockers.com/iphone.html&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #006600; font-style: italic;">// ]]&gt;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>Cya</p>
]]></content:encoded>
			<wfw:commentRss>http://scottrockers.com/blog/resources/simple-code-tricks/how-to-detect-ipad-and-redirect-to-ipad-version-website/feed</wfw:commentRss>
		<slash:comments>55</slash:comments>
		</item>
		<item>
		<title>How to Detect iPhone and Redirect to iPhone Version Website</title>
		<link>http://scottrockers.com/blog/resources/simple-code-tricks/how-to-detect-iphone-and-redirect-to-iphone-version-website</link>
		<comments>http://scottrockers.com/blog/resources/simple-code-tricks/how-to-detect-iphone-and-redirect-to-iphone-version-website#comments</comments>
		<pubDate>Wed, 09 Dec 2009 15:18:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Simple Code Tricks]]></category>
		<category><![CDATA[Detection]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://scottrockers.com/blog/?p=774</guid>
		<description><![CDATA[I came across a useful snippet of code that I wanted to pass on and post about. It detects whether the person viewing your website is on a iPhone or computer. If they are on a iPhone, you can redirect them to a iPhone version website or just to another page, its up to you. [...]]]></description>
			<content:encoded><![CDATA[<p>I came across a useful snippet of code that I wanted to pass on and post about. It detects whether the person viewing your website is on a iPhone or computer. If they are on a iPhone, you can redirect them to a iPhone version website or just to another page, its up to you. If they are on the computer it doesn&#8217;t redirect them and they go on as normal. Its just some simple javascript, and if you want to use it just change the &#8220;document.location&#8221; value to the url you want them redirected.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #006600; font-style: italic;">// &lt;![CDATA[</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>navigator.<span style="color: #660066;">userAgent</span>.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'/iPhone/i'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span>navigator.<span style="color: #660066;">userAgent</span>.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'/iPod/i'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		document.<span style="color: #660066;">location</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://www.scottrockers.com/iphone.html&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #006600; font-style: italic;">// ]]&gt;&lt;/script&gt;</span></pre></td></tr></table></div>

<p>Cya</p>
]]></content:encoded>
			<wfw:commentRss>http://scottrockers.com/blog/resources/simple-code-tricks/how-to-detect-iphone-and-redirect-to-iphone-version-website/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

