What is the use of enabling gzip in the front end of vue?

  1. when gzip, is enabled in the backend, the corresponding files will be compressed and recognized by the browser, which will have the effect of optimization.
  2. so the question is, what"s the use of enabling productionGzip: true, on the front end of a vue project?

clipboard.png

Aug.12,2021

for example, when nginx returns the js file to you, it will determine whether to open gzip, and then compress it and return it to the browser. But nginx actually determines whether there is the same file with the .gz suffix, and if so, it will return directly, and nginx itself will no longer compress it.

and compression takes time! Different levels of compression take different times.

so preparing the gz file in advance can be more optimized. And you can increase the compression ratio so that the bandwidth consumption will be less

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3cee7-41394.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3cee7-41394.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?