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

You're reading from   Responsive Design High Performance

Arrow left icon
Product type Paperback
Published in Apr 2015
Publisher
ISBN-13 9781784390839
Length 162 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (11) Chapters Close

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

Reducing the number of requests


In a previous chapter, I said that the bulk of load time is spent on loading images. So, we will start-off by focusing on reducing requests for images.

Sprite sheets

When you have a button or a background element such as Facebook, Twitter or any other link that you place on your website, you can very often reduce the number of requests by putting them in a sprite sheet.

Let's take this web page as our example:

Here is another website about coffee. I never get tired of this! This website has all the stuff that we need to improve HTTP requests: multiple images and buttons that are of the same size with different states. Let's just focus on the social media buttons. We have three buttons that are of the same size, 50 pixels by 50 pixels, and when you hover on a button, a darker version of that button is shown.

Now, instead of having six different images being fetched when a page is loaded, we are going to combine all the six images into sprite sheets.

So, what is a...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime