Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Responsive Design High Performance
Responsive Design High Performance

Responsive Design High Performance:

eBook
€13.98 €19.99
Paperback
€24.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

Responsive Design High Performance

Chapter 1. The Good, the Bad, and the Ugly of Responsive Web Design

Responsive web design, often referred to as RWD, has brought many great things for web designers since its inception in 2004, although the term was only coined in 2007 by Ethan Marcotte. The technique of adapting the layout of a site was written by Cameron Adams in 2004.

Here is a breakdown of what we'll discuss in this chapter:

  • An overview of the good, the bad, and the ugly of responsive design
  • We will look at some examples in each case
  • Thereafter, we will take a look at the effects of each example, and how it affects end users and the business

The good – appearance and management

We will be going through the good aspects of responsive web design in the following sections.

Appearance

In appearance, these are the aspects that really stand out:

  • Conformity: One of the great advantages of responsive web design is the conformity that it brings to our ever-growing, multidevice, browsing experience online. Modern web pages can now easily carry the same design characteristics from desktop to tablet and even to mobile browsers without compromise, thereby greatly enhancing a brand's web presence. Another perk is the ease that this approach brings to code maintenance. In the following screenshot, we can see a good example of adapting a site for multiple devices:
    Appearance
  • User interaction: Simply changing the site to fit inside different devices is, of course, only the tip of the iceberg. With each change of the layout, the website's usability must remain intact or, in some cases, change to suit the device that it's being viewed on. Here is a good example of user experience staying consistent throughout, from desktop to mobile:
    Appearance
  • User interaction (desktop layout): The preceding screenshot shows the desktop version of a website that has a full menu, with functions such as Sign In and Follow us that are easy to access. The content is well spaced and feels clean. The column space on the right is used for calling action links that show some of their products. The column space on the left is reserved for more involving content, with images and headings.

Let's compare this to the mobile layout, which is shown in the following screenshot:

Appearance
  • User interaction (mobile layout): In the mobile view, we can clearly see how the designers have made space for the content to take center stage on the site. The navigation collapses to show easily recognizable icons, and the main content takes up the rest of the page space, which is perfect for mobile phones.
  • Appearance (focusing on content): When it comes to mobiles, content takes center stage. Studies indicate that some users leave a site after merely 3 seconds if the content has not loaded. Responsive web design puts the focus on content. When a mobile site loads, the content needs to be easy to find and should not force the user to scroll endlessly to find what they're looking for.

Management

Here are the benefits of responsive web design from the management perspective:

  • One code source: Responsive websites have the advantage over the old mdot way of developing by virtue of keeping all of your code in one place. Another tremendous advantage of having one code source is that it avoids multiple redirects to an mdot web application. Redirects are very expensive in terms of load time and could add significant time to it.
  • Easier to maintain and update: Besides one source code, the next obvious advantage is code that is easier to maintain. With all of the code centralized, it becomes a much less demanding task to keep all your sites up-to-date. One change on your desktop site will automatically reflect on both the tablet and mobile versions, without any extra development time.

The bad – slow load times and unresponsive interactions

Like most things, with the good comes the bad, and responsive web design is no different. Without proper optimization and careful planning, your responsive website could be slow and painful for the end user to navigate. Conscientious efforts to optimize the end user's experience are an integral part of good responsive design and development.

Slow load times

One of the biggest culprits when it comes to slow load times is images. All too often, the same-sized image used on the desktop site will be loaded for the mobile version as well. This is considered bad practice; when it comes to mobile browsing, every kilobyte counts. So, why let a user download a 300 kB file when they only need to download a 100 kB file? Creating appropriately sized images for various devices is a must.

Let's take a look at an example. The next two screenshots show a comparison of image downloads between desktop and mobile versions:

Slow load times

In the preceding screenshot, you can clearly see that the image downloaded is 1140 pixels wide by 641 pixels high. This is a fairly standard header image size for a desktop site to download. Now let's see what happens when the site is viewed at mobile size, as shown in the following screenshot:

Slow load times

In the mobile view, the website still looks great. The image is 385 pixels wide by 216 pixels high, but take note of the natural size of the image displayed. The natural size of the image is still 1140 pixels by 641 pixels. This means that the same image was downloaded to be displayed on the mobile website as the desktop layout. This might not seem like a big deal, but the experience of waiting to download an image of that size on a mobile device could very well lose you viewers on your website.

We will cover some great ways to avoid this problem a bit later. There are some excellent techniques available to manage your image downloading based on your current screen size.

Browser requests

Another cause of slow load times is the number of requests that your browser is making. Limiting the number of requests made to your server to download content, style sheets, or scripts will greatly improve your page's load times.

Using techniques such as minification to reduce the size of the response also goes a long way towards making your website load incredibly fast.

As an example, I've included the sizes of the two style sheets from the Bootstrap framework—bootstrap.css and boostrap.min.css. The latter is minified, and the former is not.

Take a look at the size difference between the two files, as shown here:

Browser requests

The file that has not been minified has added almost 24 kB to the request. That might not sound like a whole lot, but there are multiple requests for JavaScript files, cascading style sheets, and other scripts going on at the same time, and it'll all add up.

We will take a look at this a bit later, and discuss how to implement some simple code to reduce the number of requests made; we'll also explore which tools we can use to get our code minified.

Unresponsive interactions

Clicking on a button and not seeing an immediate response from a user interface can be terribly frustrating.

A website that is not optimized and downloads unnecessary JavaScript files and bloated HTML documents (among other things) is prone to performance issues when it comes to interaction with the server.

The ugly – the effects of slow performance

If you've ever opened a website and had to wait an inordinate amount of time for it to load, I don't have to tell you that it can become an annoyance. Not only do people disassociate from the brand, but they become frustrated and would rather try to find the content they want from a faster, more reliable source.

Effects on the end user

As mentioned before, we have mere seconds to engage the viewer.

Take this excerpt from a study done by KISSmetrics from the article, How Loading Time Affects Your Bottom Line, by Sean Work, as an indicator. For further information, please visit https://blog.kissmetrics.com/loading-time/

Effects on the end user

The preceding screenshots gives us some interesting facts:

  • 73 percent of mobile Internet users say that they've encountered a website that was too slow upon loading
  • 51 percent of mobile Internet users say that they've encountered a website that crashed, froze, or returned an error
  • 38 percent of mobile Internet users say that they've encountered a website that wasn't available
  • 47 percent of consumers expect a web page to load in 2 seconds or fewer
  • 40 percent of people abandon a website that takes more than 3 seconds to load
  • A 1-second delay in page response can result in a 7-percent reduction in conversions
  • If an e-commerce site is making $100,000 per day, a 1-second page delay could potentially cost the company $2.5 million in lost sales every year

Effects on business

Improving a website could have a greater impact on your business than you may realize. This is a quote from an article at http://www.getelastic.com/:

 

"Walmart used a mix of pre-design, hands-on usability testing including paper-prototypes with post-design user tests (using moderated sessions throughout Canada) and on-site A/B testing, including an initial test of running both the responsive and non-responsive sites concurrently for about a week.

Results were very positive for the responsive design. Conversion's up 20%, mobile orders up 98%."

 
 --- Linda Bustos (http://www.getelastic.com/how-walmart-cas-responsive-redesign-boost-conversion-by-20/)

Let's take a look at this simple but informative image detailing the effects that load times have on consumers. It's clear that slow load times have a tremendously negative effect on consumers who shop online:

Effects on business

Summary

In this chapter, we covered briefly what responsive design is, and more importantly, why it's so important in today's webscape.

Responsive web design helps us create a more uniform appearance across an array of devices, and leaves users feeling more familiar with a brand, regardless of the device they're using to interact with it.

Code is kept together in one place and negates the need to maintain multiple pages or documents for one website.

Code that has not been optimized and reckless content download can cause websites that look great to feel terrible. This could potentiality cause users to leave the site before it's even done loading. In some cases, it may even cost you money. With all of that out of the way, let's get practical and start improving our responsive website's performance. We'll look at the placement of our resources, how to avoid common mistakes with <image> tags, and some other great techniques that we can apply instantly to see an improvement in website load times.

Left arrow icon Right arrow icon

Description

This book is ideal for developers who have experience in developing websites or possess minor knowledge of how responsive websites work. No experience of high-level website development or performance tweaking is required.

Who is this book for?

This book is ideal for developers who have experience in developing websites or possess minor knowledge of how responsive websites work. No experience of high-level website development or performance tweaking is required.
Estimated delivery fee Deliver to Denmark

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 15, 2015
Length: 162 pages
Edition : 1st
Language : English
ISBN-13 : 9781784390839
Languages :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Estimated delivery fee Deliver to Denmark

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Publication date : Apr 15, 2015
Length: 162 pages
Edition : 1st
Language : English
ISBN-13 : 9781784390839
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 103.97
Responsive Design High Performance
€24.99
Responsive Web Design by Example : Beginner's Guide - Second Edition
€36.99
Responsive Web Design with HTML5 and CSS3, Second Edition
€41.99
Total 103.97 Stars icon

Table of Contents

10 Chapters
1. The Good, the Bad, and the Ugly of Responsive Web Design Chevron down icon Chevron up icon
2. Tweaking Your Website for Performance Chevron down icon Chevron up icon
3. Managing Images Chevron down icon Chevron up icon
4. Learning Content Management Chevron down icon Chevron up icon
5. The Fastest HTTP Request is No HTTP Request Chevron down icon Chevron up icon
6. Testing, Testing, and Testing! Chevron down icon Chevron up icon
7. Speeding Up Development with Design Concepts, Patterns, and Programs Chevron down icon Chevron up icon
8. Using Tools for Performance Chevron down icon Chevron up icon
A. Taking the Next Steps Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
(2 Ratings)
5 star 0%
4 star 50%
3 star 0%
2 star 50%
1 star 0%
M Jun 05, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
This book is a great resource for intermediate web designers or developers. It walks you through the development of several very simple responsive website examples, with topics like preloading content covered early in the book.The book does note the experience levels expected, in some places. You should be comfortable with basic PHP and JS, in addition to HTML and CSS. The adaptive images example cites as "self-explanatory" code that you find when you open a PHP file. For beginners this will probably be kind of scary, especially if they've seen a syntax error before.So for beginners, the more advanced coverage might feel like too high of a bar. But for intermediate or advanced-level developers, that is the kind of thing that differentiates this book from the many beginner texts in a valuable way. Even if a lot of the coverage in this book was brief, it gave me an easily-digestible overview that helps me understand 1) when I would use a specific method, 2) why I would use it, and 3) how I would start down that path. Emphasis on the "start" because this is not an in-depth book.The biggest letdown for me, and the reason I'm deducting the first half of a star in this review, is this: When the book started to go into Angular JS and CodeIgniter, I thought it was a pleasant surprise and even got a little excited. The "section" on CodeIgniter even makes this statement: "This section goes by the assumption that you have experience using PHP and have also connected to a database before, as this will not guide you through the steps to do so." Wow, exciting! I'm ready. BUT: This is followed by absolutely no information on CodeIgniter or its role in the Responsive Design process. The book never mentions CodeIgniter again. Huh? Admittedly CodeIgniter and AngularJS content does feel like a lot to expect of a book on responsive design, but if you say you're going to deliver, you should deliver.The other half-star deduction comes from the Retina displays section. The information on Retina displays is extremely brief and not high quality, and while the code snippet listed was one I hadn't seen before, I couldn't immediately think of a way to put it to use. I can't emphasize how important it is for a modern website to support high-DPI graphics, and the techniques are not really that lengthy.Regarding the lack of deep coverage: I felt this was a strength. I am an intuitive learner and really appreciate a good high-level overview. I felt that this was one of the book's biggest strengths.There were also some great third-party resources covered in the book that I hadn't come across yet after building responsive sites for 4 years.If you are getting advanced with HTML and CSS, and want to expand your practical javascript toolset a bit more, this book might be a good way to do that. Some very helpful JS snippets are included, and they are brief enough that you probably won't wear yourself out with coding fatigue.Finally, it wasn't major, but I noticed some confusing English text in the differentiation between LESS and SASS. "Some only need to have Python installed..." huh?Overall: Even considering the negatives, for me there is just too much valuable content in this book to rate it lower than four stars--I know I'll refer to parts of it next time I work on a professional project, and that's easily worth the price to me. But please note that I purchased this book during a big sale on the publisher's website and felt like it was a great deal especially considering the cost.Note: I was contacted by Packt, who noticed I purchased the book and offered a reward in exchange for an unbiased review.
Amazon Verified review Amazon
Racykiwi May 25, 2015
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
This is a very thin book, which combined with Dewald Els’s easy to read, “chatty” style, makes this a book you can finish in a single evening.The question though, is whether you would want to.There is no depth to this book. Dewald rushes past each topic, devoting no more than a paragraph to things such as Angular, SASS, progressive enhancement, etags, compression and minification.If you want to learn about Responsive Design, then you will have to look elsewhere. There is no more than a page or two in total of real information here – mostly involving media queries.In most cases Dewald briefly describes a topic, then provides a link and tells you to go and read about it elsewhere.There is a very simple code example in chapter two, just two divs and two css classes, but the two don't match up! It's not hard to figure out what he ment to say, but you do start to wonder about the quality of his work.In chapter 3, he suggests embedding html within strings in the javascript code, as a way of ensuring that the dom elements are only loaded if the screen width is wide enough. I would suggest that this is not best practice as it's a maintenance nightmare!Chapter seven starts with the words: “You’re still here!”. Is the author expecting that any normal reader would have given up by now?I expect that most readers would find the detailed description of how to create sprites (one of the few topics that is described in detail) to be tedious, and not anything that an average web developer wouldn’t already know.This is not the Responsive Design book you are looking for.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela