Using a dynamic serving theme based on the client browser
Using a responsive theme allows you to build a single theme that has the same look and feel through all devices and will also generate more traffic and slower loads on devices with a smaller viewport if you don't want to show the same information to them. With dynamic serving, you can assign a custom theme with your own layout configuration based on the User-Agent string that is sent by the client browser. This allows you to show only the content that is relevant to that user's device; this can be useful for images shown on the home page and also with the way you display your product details.
Getting ready
In order to use dynamic serving, you must first know what devices you want to show a different layout for.
How to do it…
In this recipe, we will see how to create a new theme that depends on the theme created in the Creating a new theme recipe of this chapter. Remove the desktop definition CSS and show this theme to users of the iPhone...