Mobile Browser Meta and Javascript


/ Published in: HTML
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <meta name="HandheldFriendly" content="True">
  2. <meta name="MobileOptimized" content="320"/>
  3. <meta name="viewport" content="width=device-width, target-densitydpi=160dpi, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  4. <meta name="apple-mobile-web-app-capable" content="yes" />
  5. <meta names="apple-mobile-web-app-status-bar-style" content="black" />
  6. <link rel="apple-touch-startup-image" href="images/startup.png" />
  7. <link rel="apple-touch-icon" href="images/touch-icon.png" />
  8. <meta name="robots" content="noarchive,noindex,nofollow">
  9.  
  10. jQuery(function() {
  11. /mobile/i.test(navigator.userAgent) && document.documentElement.scrollTop === 0 && !pageYOffset && !location.hash && setTimeout(function () {
  12. window.scrollTo(0, 1);
  13. }, 1000);
  14. });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.