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 ...

Get Magento 2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.