Welcome! Log In Create A New Profile

Advanced

Managing Static Files

bittnitt@gmail.com
January 30, 2024 02:38AM
Hi...I read a few articles about managing static files and I'm a bit confused!
I use Nginx as the main server to host my website
I enabled gzip and brotli
I have also enabled gzip_static and brotli_static
And I have pre-compressed all static files with gzip and brotli
I read in an article that after compressing all files, I should delete all uncompressed files to save memory and only gzip and Brotli files remain.
(Of course, I need to create an empty file called index.html for it to work properly)
Everything works fine now but my problem is when the browser doesn't support compression and requires uncompressed files.
In another article it was written that if gunzip is enabled for browsers that do not support the compressed format, it decompresses the gzip then sends it to the client.
But after doing some testing, I found (I think) that gnuzip only works if nginx is used as the proxy (between main server and client) (due to the content encoding header requirement).
Now, if I want to support gzip, brotli and non-compressed files, do I have to have all three types of files? Is this method correct? What method do you use? What method is suggested?Thanks

bitt-nitt_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Managing Static Files

bittnitt@gmail.com January 30, 2024 02:38AM

Re: Managing Static Files

Maxim Dounin January 30, 2024 10:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 115
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready