June 2012
Beginner to intermediate
304 pages
7h 28m
English
Mobile websites are often developed separately from primary websites (those intended to be viewed on a desktop or laptop), although they may use much of the same content. To make sure your website is tailored for mobile devices, you’ll want to detect when a mobile device visits the site and then redirect the device to markup made especially for mobile. You may also want to deliver a website layout and content based on a specific mobile device. In this chapter, you’ll learn how to do both. Let’s begin by learning how to detect when a mobile device accesses your website.
Since PHP is one of the most popular scripting languages on the web, let’s look at a PHP function that performs mobile detection across a ...
Read now
Unlock full access