jpbazinet.com

all my stuff

jpbazinet.com

Main menu

Skip to primary content
Skip to secondary content
  • Home

Tag Archives: mibile

Detect mobile browsers and forward with Javascript

Posted on March 28, 2012 by admin
Reply
<script type="text/javascript">// <![CDATA[  
    var mobile = (/iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()));  
    if (mobile) {  
        document.location = "http://www.yoursite.com/mobile.html";  
    }  
// ]]></script>
Posted in Programming | Tagged javascript, mibile | Leave a reply

My Links

  • MallDeals
  • Movie-List.com
  • Wedding

Follow Me!

Follow Us on FacebookFollow Us on Google+Follow Us on TwitterFollow Us on FoursquareFollow Us on E-mail

Categories

  • Cool Trailers
  • Photo Albums
  • Programming
  • Song of the Day
  • Uncategorized

Meta

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Proudly powered by WordPress