Does it also need to be configured to enable gzip, backend when vue is packaged?

config/index.js package after gzip compression is enabled:

clipboard.png
:

clipboard.png

clipboard.png

Mar.10,2021

The Accept-Encoding: gzip in

Request Headers simply indicates that the front end (user browser) supports gzip compression.

you also need to enable gzip support on the server. For more information, please see whether the Content-Encoding field in Response Headers is gzip.

and the server can support gzip in two ways:

  1. generate the corresponding .gz file when packaging. When the browser requests xx.js, the server returns the corresponding xxx.js.gz file
  2. when the browser requests xx.js, the server gzip compresses the xx.js and transmits it to the browser

to configure gzip, for backend servers, it is recommended to take a look at the complete gzip articles, such as https://zhuanlan.zhihu.com/p/24764131


when packing without gzip, browsers can be configured directly. Different browsers have different configuration methods.

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-1b3bf9b-2c2ef.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-1b3bf9b-2c2ef.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?