O'Reilly logo

HTML5 and CSS3 Responsive Web Design Cookbook by Benjamin LaGrone

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the Safari Developer Tools' User Agent switcher

For developing mobile-first applications, you will need to deploy them locally and test the various features you have developed. Many of the responsive web recipes we have worked on so far relied on media queries to determine layout based on size to deliver the optimized view of your site. This is not the only way in which apps can deliver mobile layout, there are more. One method is, by sniffing the user agent.

You may already know about the user agent, but let's assume you don't. Besides, knowing everything already simply defeats the purpose of buying the book, now doesn't it? The user agent exists in the request header and identifies the client software making the request. It contains information ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required