Next.js Discord

Discord Forum

Questions regarding the specifics of Next.js compress

Unanswered
American Shorthair posted this in #help-forum
Open in Discord
American ShorthairOP
The page in documentation refers to gzip being the default compression. If I have a server action that returns a large amount of data, say 10mb, and that data is used in a UseEffect() in a client, will any compression take place? I would assume not, the documentation says "rendered content and static files"

If I have .json files served from a clints-side fetch() from /public would they be compressed? I would assume so because it is a static file? What about if it was import() in a useEffect()?

I'm really interested to hear all the details of this, as it seems like it would be very useful to leverage gzip in certain scenarios.

Thanks!

0 Replies