Run when the page, the execution to JS will be judged from the mobile or the PC side, if it is the mobile side jump to develop the link address, so that there will be extra time on the mobile phone to waste load,,,
var browser={versions:function () {var u = navigator.useragent, app = Navigator.appversion; return {//Mobile terminal browser version information Trident:u.indexof (' Trident ') >-1,//ie kernel presto: U.indexof (' Presto ') >-1,//opera kernel webkit:u.indexof (' AppleWebKit ') >-1,//Apple, Google kernel Gecko:u.indexof (' Gecko ') >-1 && u.indexof (' khtml ') = =-1,//Firefox core mobile:!! U.match (/applewebkit.*mobile.*/),//Whether for Mobile terminal iOS:!! U.match (/\ (i[^;] +;( U;)? Cpu.+mac OS x/),//ios terminal Android:u.indexof (' Android ') >-1 | | U.indexof (' Linux ') >-1,//android terminal or UC Browser iphone:u.indexof (' iphone ') >-1,//whether for IPhone or QQHD Browser ipad:u.indexof (' ipad ') >-1,//whether IPad webapp:u.indexof (' Safari ') = = 1//Yes No web should program, no head with bottom}; } (), Language: (Navigator.browserlanguAge | | navigator.language). toLowerCase ()} if (Browser.versions.mobile | | browser.versions.ios | | browser.versions.an Droid | | Browser.versions.iPhone | | Browser.versions.iPad) {window.location = "http://m.baidu.com"; }
JS to determine whether the mobile or PC-side