Book Image

Spring Cookbook

Book Image

Spring Cookbook

Overview of this book

Table of Contents (19 chapters)
Spring Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


To build a mobile-friendly website, the current trend is to use responsive design where the page adapts to the screen width. This way, the same page is nicely displayed on all devices: computers, tablets and mobiles.

Another approach, which this chapter covers, is to build a separate website for mobile devices. This requires building two pages (different HTML and distinct URLs) for each page of the website: one for the computer and one for the mobile. This extra work makes sense when:

  • Performance is important. For example, the loading time of a responsive website like https://www.flickr.com/ would be too long on mobile devices because of the high-resolution images of the desktop version. A separate mobile website makes it easier to optimize the user experience on mobile devices.

  • The computer version of the website already exists; in this case, it's usually much simpler to build a separate mobile website.

In this chapter, we'll cover how to serve different pages to mobile devices...