Jump to content

Responsive web design

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Jtg920 (talk | contribs) at 17:04, 22 August 2013 (Corrected invalid reference: Author's name is "Nick Pettit," not "Zoe Nick Pettit"). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Responsive web design (RWD) is a web design approach aimed at crafting sites to provide an optimal viewing experience—easy reading and navigation with a minimum of resizing, panning, and scrolling—across a wide range of devices (from mobile phones to desktop computer monitors).[1][2][3]

A site designed with RWD[1][4] adapts the layout to the viewing environment by using fluid, proportion-based grids,[5] flexible images,[6][7][8][9] and CSS3 media queries,[3][10][11] an extension of the @media rule.[12]

  • The fluid grid concept calls for page element sizing to be in relative units like percentages, rather than absolute units like pixels or points.[5]
  • Flexible images are also sized in relative units, so as to prevent them from displaying outside their containing element.[6]
  • Media queries allow the page to use different CSS style rules based on characteristics of the device the site is being displayed on, most commonly the width of the browser.
  • Server-side components (RESS) in conjunction with client-side ones such as media queries can produce faster-loading sites for access over cellular networks and also deliver richer functionality/usability avoiding some of the pitfalls of device-side-only solutions[13].

Mobile first, unobtrusive JavaScript, and progressive enhancement

"Mobile first" and "unobtrusive JavaScript"/"progressive enhancement" (strategies for when a new site design is being considered) are related concepts that predated RWD: browsers of basic mobile phones do not understand JavaScript or media queries, so the recommended practice is to create a basic web site then enhance it for smart phones and PCs—rather than try "graceful degradation" to make a complex, image-heavy site work on the most basic mobile phones.[14][15][16][17]

Progressive enhancement based on browser-, device-, or feature-detection

Where a web site must support basic mobile devices that lack JavaScript, browser ("user agent") detection (also called "browser sniffing"), and mobile device detection[15][18] are two ways of deducing if certain HTML and CSS features are supported (as a basis for progressive enhancement)—however, these methods are not completely reliable unless used in conjunction with a device capabilities database.

For more capable mobile phones and PCs, JavaScript frameworks like Modernizr, jQuery, and jQuery Mobile that can directly test browser support for HTML/CSS features (or identify the device or user agent) are popular. Polyfills can be used to add support for features—e.g. to support media queries (required for RWD), and enhance HTML5 support, on Internet Explorer. Feature detection also might not be completely reliable with older browsers: some may report that a feature is available, when it is either missing or so poorly implemented that it is effectively nonfunctional.[19][20]

Challenges, and other approaches

Luke Wroblewski has summarized some of the RWD and mobile design challenges, and created a catalog of multi-device layout patterns.[21][22][23] He suggests that, compared with a simple RWD approach, device experience or RESS (responsive web design with server side components) approaches can provide a user experience that is better optimized for mobile devices.[24][25][26] Server-side "dynamic CSS" implementation of stylesheet languages like Sass or Incentivated's MML can be part of such an approach by accessing a server based API which handles the device (typically mobile handset) differences in conjunction with a device capabilities database in order to improve usability.[27] RESS is more expensive to develop of course, requiring more than just client side logic, and so tends to be reserved for organisations with larger budgets.

One problem for RWD is that banner advertisements and videos are not fluid.[28] However search advertising and (banner) display advertising support specific device platform targeting and different advertisement size formats for desktop, smartphone, and basic mobile devices. Different landing page URLs can be used for different platforms,[29] or AJAX can be used to display different ad variants on a page.[18][22][30]

There are now many ways of validating and testing RWD designs,[31] ranging from mobile site validators and mobile emulators[32] to simultaneous testing tools like Adobe Edge Inspect.[33] The Firefox browser and the Chrome console offer responsive design viewport resizing tools, as do third parties.[34][35]

History

Ethan Marcotte coined the term responsive web design (RWD) in a May 2010 article in A List Apart.[1] He described the theory and practice of responsive web design in his brief 2011 book titled Responsive Web Design. Responsive design was listed as #2 in Top Web Design Trends for 2012 by .net magazine[36] after progressive enhancement at #1. They also listed 20 of Ethan Marcotte's favourite responsive sites.[2]

Mashable called 2013 the Year of Responsive Web Design.[37]

Forbes explains Why You Need to Prioritize Responsive Design Right Now.[38]

See also

References

  1. ^ a b c Marcotte, Ethan (May 25, 2010). "Responsive web design". A List Apart.
  2. ^ a b "Ethan Marcotte's 20 favourite responsive sites". .net magazine. October 11, 2011.
  3. ^ a b Gillenwater, Zoe Mickley (Dec. 15, 2010). "Examples of flexible layouts with CSS3 media queries". Stunning CSS3. p. 320. ISBN 978-0-321-722133. {{cite web}}: Check date values in: |date= (help)
  4. ^ Pettit, Nick (Aug. 8, 2012). "Beginner's Guide to Responsive Web Design". TeamTreehouse.com blog. {{cite web}}: Check date values in: |date= (help)
  5. ^ a b Marcotte, Ethan (March 3, 2009). "Fluid Grids". A List Apart.
  6. ^ a b Marcotte, Ethan (June 7, 2011). "Fluid images". A List Apart.
  7. ^ "Adaptive Images".
  8. ^ Hannemann, Anselm (Sept. 7, 2012). "The road to responsive images". net Magazine. {{cite web}}: Check date values in: |date= (help)
  9. ^ Jacobs, Denise (August 23, 2011). "21 top tools for responsive web design". .net Magazine.
  10. ^ Gillenwater, Zoe Mickley (Oct. 21, 2011). "Crafting quality media queries". {{cite web}}: Check date values in: |date= (help)
  11. ^ "Responsive design—harnessing the power of media queries". Google Webmaster Central. Apr. 30, 2012. {{cite web}}: Check date values in: |date= (help)
  12. ^ W3C @media rule
  13. ^ http://www.gomonews.com/gatwick-airport-site-suddenly-becomes-user-unfriendly
  14. ^ Wroblewski, Luke (November 3, 2009). "Mobile First".
  15. ^ a b Firtman, Maximiliano (July 30, 2010). Programming the Mobile Web. p. 512. ISBN 978-0-596-80778-8.
  16. ^ "Graceful degradation versus progressive enhancement". February 3, 2009.
  17. ^ Designing with Progressive Enhancement. March 1, 2010. p. 456. ISBN 978-0-321-65888-3.
  18. ^ a b "Server-Side Device Detection: History, Benefits And How-To". Smashing magazine. September 24, 2012.
  19. ^ "BlackBerry Torch: The HTML5 Developer Scorecard | Blog". Sencha. 2010-08-18. Retrieved 2012-09-11.
  20. ^ "Motorola Xoom: The HTML5 Developer Scorecard | Blog". Sencha. 2011-02-24. Retrieved 2012-09-11.
  21. ^ Wroblewski, Luke (May 17, 2011). "Mobilism: jQuery Mobile".
  22. ^ a b Wroblewski, Luke (February 6, 2012). "Rolling Up Our Responsive Sleeves".
  23. ^ Wroblewski, Luke (March 14, 2012). "Multi-Device Layout Patterns".
  24. ^ Wroblewski, Luke (February 29, 2012). "Responsive Design ... or RESS".
  25. ^ Wroblewski, Luke (September 12, 2011). "RESS: Responsive Design + Server Side Components".
  26. ^ Andersen, Anders (May 9, 2012). "Getting Started with RESS".
  27. ^ "Responsive but not completely mobile optimised | Blog". Incentivated.
  28. ^ Snyder, Matthew; Koren, Etai (Apr. 30, 2012). "The state of responsive advertising: the publishers' perspective". .net Magazine. {{cite web}}: Check date values in: |date= (help)
  29. ^ Google AdWords Targeting (Device Platform Targeting)
  30. ^ JavaScript and Responsive Web Design Google Developers
  31. ^ Young, James (Aug. 13, 2012). "Top responsive web design problems... testing". .net Magazine. {{cite web}}: Check date values in: |date= (help)
  32. ^ "Best mobile emulators and RWD testing tools". The Mobile Web Design Blog. Nov. 26, 2011. {{cite web}}: Check date values in: |date= (help)
  33. ^ Rinaldi, Brian (September 26, 2012). "Browser testing... with Adobe Edge Inspect".
  34. ^ Responsive Design View in Firefox
  35. ^ Viewport resizer
  36. ^ "15 top web design and development trends for 2012". .net magazine. January 9, 2012.
  37. ^ Cashmore, Pete (Dec 11, 2012). "Why 2013 Is the Year of Responsive Web Design".
  38. ^ Gunelius, Susan (Mar 26, 2013). "Why You Need to Prioritize Responsive Design Right Now".