Configure web page compression to save resources 1. First, let's modify the configuration vim /usr/local/nginx/conf/nginx.conf http { ...... gzip on; #Uncomment and enable gzip compression function gzip_min_length 1k; #Minimum compressed file size gzip_buffers 4 64k; #Compression buffer, size is 4 64k buffers gzip_http_version 1.1; #Compression version (default 1.1, if the front end is squid2.5, please use 1.0) gzip_comp_level 6; #Compression ratio gzip_vary on; #Support front-end cache server to store compressed pages gzip_types test/plain text/javascript application/x-javascript text/css text/xml application/xml application/xml+rss image/jpg image/jpeg image/png image/gif application/x-httpd-php application/javascript application/json; #Compression type, indicating which web documents enable compression function...... } 2. Drag the pictures we need to display into the folder 3. Insert this picture into the web page vim index.html ...... <img src="game.jpg"/> #Insert pictures into the webpage</body> </html> 4. Restart the service 5. Check in the element and find that it has been compressed This is the end of this article about Nginx optimization service web page compression. For more relevant Nginx web page compression content, please search 123WORDPRESS.COM’s previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Detailed explanation of MySQL Workbench usage tutorial
>>: W3C Tutorial (12): W3C Soap Activity
Table of contents 1. What is a JavaScript engine?...
What is a memory leak? A memory leak means that a...
I searched for many ways to change it online but ...
I have always used Loadrunner to do performance t...
Table of contents 1. Installation: 2. Use: 3. Bui...
Suddenly when I logged into MySQL, it said that a...
Today, due to project requirements, js is needed t...
Table of contents JS function call, apply and bin...
Table of contents introduction 1. Overall archite...
Detailed explanation of the solution to garbled c...
Table of contents Preface Is the interviewer aski...
Table of contents 1. Test Data 2. The inconvenien...
1. Preparation Install Tomcat on Linux system, us...
Table of contents Preface 1. Optimistic Locking A...
Script requirements: Back up the MySQL database e...