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. beforeCreate and created fun...
Some tips for deep optimization to improve websit...
background A specific device is used to perform i...
The nginx.conf configuration file is as follows u...
Important data must be backed up, and must be bac...
Nginx's configuration syntax is flexible and ...
As shown in the figure below, it is a common desi...
Download the MySQL installer Official download ad...
This article example shares the specific code of ...
I had been using MySQL 5.7 before, but because My...
There are two types of html tags, inline elements...
This article example shares the specific code of ...
Using c3p0 Import the c3p0jar package <!-- htt...
Preface If you are going to interview for a Linux...
Table of contents Single condition single data fi...