Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Important
Security Advisory: React2Shell & two new vulnerabilities
Find out more

compress

Last updated April 15, 2025

By default, Next.js usesgzip to compress rendered content and static files when usingnext start or a custom server. This is an optimization for applications that do not have compression configured. If compression isalready configured in your application via a custom server, Next.js will not add compression.

You can check if compression is enabled and which algorithm is used by looking at theAccept-Encoding (browser accepted options) andContent-Encoding (currently used) headers in the response.

Disabling compression

To disablecompression, set thecompress config option tofalse:

next.config.js
module.exports= {  compress:false,}

Wedo not recommend disabling compression unless you have compression configured on your server, as compression reduces bandwidth usage and improves the performance of your application. For example, you're usingnginx and want to switch tobrotli, set thecompress option tofalse to allow nginx to handle compression.

Was this helpful?

supported.

[8]ページ先頭

©2009-2025 Movatter.jp