These days, there are many ways to browse the internet. There are desktop browsers, mobile phone browsers, tablets, tablet/phones (e.g. Dell Streak), etc. all with different screen sizes, resolution, and capabilities. How do you render an appropriate view optimized for the device accessing your site? The answer is device detection.
The two main approaches for device detection are server-side detection and client side detection. Server side detection involves determining the device at the time of the request and then presenting the appropriate view. Client side detection involves manipulating the view after the content has been sent to the browser.
When it comes to server-side detection, the main approach is to rely on the USER_AGENT (UA) HTTP header string that comes in each web request. There are many frameworks and tools to help interpret the UA string, and I will present some of those options in a subsequent blog post. For now, it is a safe assumption that classifications of devices (e.g smart phone, feature phone, etc.) can be determined via the UA string.
While this combination of server and client side detection may not be appropriate for your circumstances, it is a simple approach that is valid for many situations.