Until I joined Velocity Partners, all of my work centered on responsive web design, with the goal of building web sites that worked on every device and at every screen size. From my very first client engagement at VP, however, I had the opportunity to work with a different approach: adaptive web design.
At first, I felt like I had gone back in time five years. I had gotten so used to working with media queries or building for mobile first that those design patterns were my de facto method of building websites. There is more than one way to build a site, though, and I’d like to share a little of my experience working with each of these approaches. Let’s start with a quick introduction:
Responsive Web Design
Responsive web design uses fluid grids and media queries to change how the layout looks and display the content based on the size of the viewport. It’s mostly focused on screen width because the layout expands vertically when the available width changes size. It uses a single template for every available device and utilizes client side detection.
/* Small size */
@media only screen and (min width:320px) {}
@media only screen and (min width:480px) {}
/* Medium size */
@media only screen and (min width:600px) {}
@media only screen and (min width:800px) {}
@media only screen and (min width:1024px) {}
/* Look for screen Orientation */
@media only screen and (orientation:landscape) {}
Inside the curly braces on each condition are proper attributes to the layout components, which change the way they look.
Adaptive Web Design
This design pattern has two approaches: Client side and server side detection, each of which are designed to identify the user’s device and serve the correct layout, template, stylesheet and scripts for that device. Adaptive web design sends the client only what it needs and nothing more, reducing load time.
Simple example of device detection on the client side using JavaScript:
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { // Add some code here. }
Many client side frameworks provide built in functions to detect the user device; when they do not, there are many plugins available on the web that you can play with.
Key Differences
Understanding the differences between responsive and adaptive web design can help you select the best design pattern for your project: