1. Use PC's idea to do mobile, write dead page width
<name= "Viewport" content= "width=640,target-densitydpi=320, User-scalable=no "/>
2. Change the initial value of jquery mobile swipe
$.event.special.swipe.horizontaldistancethreshold = 10;
3. Determine if it is a built-in browser
function is_weixin () { var ua = navigator.userAgent.toLowerCase (); if (Ua.match (/micromessenger/i) = = "Micromessenger") {returntrue; Else { returnfalse; } }
4. Determine browser type
functionIsBrowser () {varsys={}; varUa=navigator.userAgent.toLowerCase (); vars; (S=ua.match (/msie ([\d.] +)/))? Sys.ie=s[1]: (S=ua.match (/firefox\/([\d.] +)/))? Sys.firefox=s[1]: (S=ua.match (/chrome\/([\d.] +)/))? Sys.chrome=s[1]: (S=ua.match (/opera. ( [\d.] +)/))? Sys.opera=s[1]: (S=ua.match (/version\/([\d.] +). *safari/))? sys.safari=s[1]:0; if(Sys.safari) {// } }
5.ios Add Home Screen icon
<Linkrel= "apple-touch-icon-precomposed"Sizes= "144x144"href= "Http://*/apple-touch-icon-144x144.png"><Linkrel= "apple-touch-icon-precomposed"Sizes= "120x120"href= "Http://*/apple-touch-icon-120x120.png"><Linkrel= "apple-touch-icon-precomposed"Sizes= "72x72"href= "Http://*/apple-touch-icon-72x72.png"><Linkrel= "apple-touch-icon-precomposed"href= "*/apple-touch-icon-57x57.png">
<meta name= "Apple-mobile-web-app-title" content= "official website" >
General knowledge of mobile phone projects