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

Compression


Using compression on your content can minimize the size of the content being delivered. This is done by compressing it when it is being transferred from the server and deflating it when it arrives at the client location. This is done by the following code line:

<IfModule mod_deflate.c>

The preceding piece of code checks whether the module to compress/deflate the content is currently enabled on the server.

You might wonder if compression has a notable effect on your website? Take a look at this screenshot that I took from a website using GZIP compression.

As you can see from the screenshot, the website file size was reduced by 76.6%, which is more than half its original size. A great place to test the compression is to go to http://www.feedthebot.com/tools/gzip/ and enter your web URL.

If you're using a NGINX server, the code will be slightly different; here is a sample:

gzip on;
gzip_comp_level 2;
gzip_http_version 1.0;
gzip_proxied any;
gzip_min_length 1100;
gzip_buffers 16...
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