Many users are at a loss as to how Safari will always render the mobile version of a website rather than the desktop version. I found some interesting information in the Apple Developer pages that helps explain what is happening to cause this behavior.
Using the Safari User Agent String
The Safari user agent string for iOS is similar to the user agent string for Safari on the desktop except for two additions: It contains a platform name and the mobile version number. The device name is contained in the platform name. For example, you can detect iOS and the specific device such as iPad. Typically, you do not send iPhone-specific web content to an iPad since it has a much larger screen. Note that the version numbers in this string are subject to change over time as new versions of iOS become available, so any code that checks the user agent string should not rely on version numbers.
For example, Listing 2-3 shows the user agent string for an iPhone running iOS 2.0 and later, where the string XXXX is replaced with the build number.
Listing 2-3 iPhone running on iOS 2.0 user agent string
The parts of the Safari on iOS user agent string are as follows:
Mozilla/5.0 (iPhone; U; CPU iOS 2_0 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/XXXXX Safari/525.20
(iPhone; U; CPU iOS 2_0 like Mac OS X; en-us)
The platform string. iPhone is replaced with iPod when running on an iPod touch and iPad when running on an iPad.
The WebKit engine build number.
The Safari family version.
The mobile version number, where XXXX is the build number.
The Safari build number.
For example, the user agent string for an iPod touch contains iPod in the platform name as shown in Listing 2-4.
Listing 2-4 iPod touch running iOS 1.1.3 user agent string
The user agent string for an iPad contains iPad in the platform name as shown in Listing 2-5.
Mozilla/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Gecko) Version/3.0 Mobile/4A93 Safari/419.3
Listing 2-5 iPad running iOS 3.2 user agent string
Note that the user agent string is slightly different for earlier Safari on iOS releases. Listing 2-6 shows the user agent string for an iPhone running iOS 1.1.4 and earlier. Note that the platform string does not contain the iOS version number.
Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10
Listing 2-6 iPhone running iOS 1.0 user agent string
Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543 Safari/419.3