{"id":4137,"date":"2009-06-04T13:13:15","date_gmt":"2009-06-04T21:13:15","guid":{"rendered":"http:\/\/wapreview.com\/?p=4137"},"modified":"2011-01-13T11:53:50","modified_gmt":"2011-01-13T19:53:50","slug":"detect-mobile-vistors-to-your-site-with-this-free-script","status":"publish","type":"post","link":"https:\/\/wapreview.com\/4137\/","title":{"rendered":"Detect Mobile Vistors to Your Site With This Free Script"},"content":{"rendered":"

Over at OSNews<\/a>, Eugenia Loli-Queru<\/a> has just updated the OSNews Mobile Detection Kit<\/strong><\/em>, a simple PHP script that analyzes visiting browser’s User-Agent headers and redirects them to the mobile or full version of your site. Scripts like this are a light weight\/high performance alternative to more elaborate device detection packages like WURFL <\/a>or Device Atlas<\/a>. For blogs and news sites that have a mostly-text, “one size fits all” mobile site this script is all you need to send mobile visitors to it.<\/p>\n

There are quite a few similar mobile device detection scripts floating around the net. Eugenia’s is by far the most complete in terms of the number of different mobile user agents it tests for. The script even recognizes text-only, legacy desktop, PDA, game console and embedded systems browsers that would choke on a typical desktop site and sends them to your mobile version. There’s a hook to optionally redirect wml-only devices to a wml version of your site and logic to make sure that search engine crawlers see your full site. It also detects those pesky transcoders<\/a> and redirects them to your mobile site where you should be sending a Cache-Control No-Transform<\/em><\/strong> header to tell them to leave your content alone.<\/p>\n

The script will require a little tweaking to get working on your site as the targets of the redirection are hard-coded. The README.txt file included in the download tells you everything you need to know in order to use it and has suggestions for advanced use. It’s open source so you are free to modify it to suit your needs.<\/p>\n

Download the Mobile Detection Kit here<\/a>. One word of warning. It’s fine to automatically deliver mobile formatted content to mobile browsers, but always provide users with a way to reach your full site if they want to. It’s unlikely that you mobile edition contains all the content of your desktop version. \tUsers hate being blocked from content<\/a>. Just add a “Full Version” link on the mobile site that bypasses the detection script or sets a cookie that the script can be modified to check.<\/p>\n","protected":false},"excerpt":{"rendered":"

Over at OSNews, Eugenia Loli-Queru has just updated the OSNews Mobile Detection Kit, a simple PHP script that analyzes visiting browser’s User-Agent headers and redirects them to the mobile or full version of your site. Scripts like this are a light weight\/high performance alternative to more elaborate device detection packages like WURFL or Device Atlas. For blogs and news sites that have a mostly-text, “one size fits all” mobile site this script is all you need to send mobile visitors … Continue reading →<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[51],"tags":[815],"_links":{"self":[{"href":"https:\/\/wapreview.com\/wp-json\/wp\/v2\/posts\/4137"}],"collection":[{"href":"https:\/\/wapreview.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wapreview.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wapreview.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wapreview.com\/wp-json\/wp\/v2\/comments?post=4137"}],"version-history":[{"count":9,"href":"https:\/\/wapreview.com\/wp-json\/wp\/v2\/posts\/4137\/revisions"}],"predecessor-version":[{"id":4146,"href":"https:\/\/wapreview.com\/wp-json\/wp\/v2\/posts\/4137\/revisions\/4146"}],"wp:attachment":[{"href":"https:\/\/wapreview.com\/wp-json\/wp\/v2\/media?parent=4137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wapreview.com\/wp-json\/wp\/v2\/categories?post=4137"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wapreview.com\/wp-json\/wp\/v2\/tags?post=4137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}