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
NGINX Cookbook

You're reading from   NGINX Cookbook Over 70 recipes for real-world configuration, deployment, and performance

Arrow left icon
Product type Paperback
Published in Aug 2017
Publisher Packt
ISBN-13 9781786466174
Length 278 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Tim Butler Tim Butler
Author Profile Icon Tim Butler
Tim Butler
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Let's Get Started 2. Common PHP Scenarios FREE CHAPTER 3. Common Frameworks 4. All About SSLs 5. Logging 6. Rewrites 7. Reverse Proxy 8. Load Balancing 9. Advanced Features 10. Docker Containers 11. Performance Tuning 12. OpenResty 13. NGINX Plus – The Commercial Offering

Gzipping content in NGINX

Gzip is a compression format, which is based on the DEFLATE algorithm and commonly found in most Unix environments. Compressing your HTML files is an easy way to reduce the amount of data transferred from NGINX to the browser. This in turn means that pages also load quicker as the file can be transferred in a shorter time due to the reduced size.

While it usually shows the most gain, HTML-based content isn't the only thing, which can compress easily. Any text-based file (for example, JavaScript or CSS) will generally compress by 70 percent or more, which can be quite significant with modern websites.

Of course, enabling compression isn't free. There is a performance hit in server load, as the server needs to use CPU cycles to compress the data. While this used to be a large consideration, with modern CPU's, the performance hit is far outweighed...

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 $19.99/month. Cancel anytime