Skip to content

Commit 0205e74

Browse files
authored
Update README.md
1 parent c5c4f86 commit 0205e74

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Nginx-Lua-minification-library
22
A compression and minification library to minify static or dynamic assets like HTML PHP outputs CSS style sheets JS Javascript all text/html or plain text mime types that nginx can output that the browser will read so they are small compressed and have white space removed as well as helping reduce bandwidth consumption since the files served from nginx webserver are now smaller.
33

4-
> Please note, this script will only remove comments, white spaces and breaklines from your code. So, this mean it will not "rebuild" your files in order to minify the code. If you want something similar, I recommend using [Pagespeed](https://developers.google.com/speed/pagespeed/module/ "Pagespeed") from Google
5-
64
# Information :
75

86
I built this script to compress and keep the specified mime types outputs small and minify the bandwidth that my servers have to use when serving these files to users.
@@ -19,7 +17,7 @@ https://github.com/C0nw0nk/Nginx-Lua-minification-library/pulls
1917

2018
Edit settings inside `minify.lua` to add your own mime types or improve my regex. (Please share your soloutions and additions)
2119

22-
https://github.com/C0nw0nk/Nginx-Lua-minification-library/blob/master/lua/minify/minify.lua#L69
20+
https://github.com/C0nw0nk/Nginx-Lua-minification-library/blob/master/lua/minify/minify.lua
2321

2422
Add this to your Nginx configuration folder.
2523

@@ -30,7 +28,7 @@ Once installed into your `nginx/conf/` folder.
3028
Add this to your HTTP block or it can be in a server or location block depending where you want this script to run for individual locations the entire server or every single website on the server.
3129

3230
```
33-
lua_shared_dict minify 10m; #Minified pages cache
31+
lua_shared_dict html_cache 10m; #HTML pages cache
3432
access_by_lua_file conf/lua/minify/minify.lua;
3533
```
3634

@@ -41,7 +39,7 @@ This will run for all websites on the nginx server
4139
```
4240
http {
4341
#nginx config settings etc
44-
lua_shared_dict minify 10m; #Minified pages cache
42+
lua_shared_dict html_cache 10m; #HTML pages cache
4543
access_by_lua_file conf/lua/minify/minify.lua;
4644
#more config settings and some server stuff
4745
}
@@ -52,7 +50,7 @@ This will make it run for this website only
5250
```
5351
server {
5452
#nginx config settings etc
55-
lua_shared_dict minify 10m; #Minified pages cache
53+
lua_shared_dict html_cache 10m; #HTML pages cache
5654
access_by_lua_file conf/lua/minify/minify.lua;
5755
#more config settings and some server stuff
5856
}
@@ -63,7 +61,7 @@ This will run in this location block only
6361
```
6462
location / {
6563
#nginx config settings etc
66-
lua_shared_dict minify 10m; #Minified pages cache
64+
lua_shared_dict html_cache 10m; #HTML pages cache
6765
access_by_lua_file conf/lua/minify/minify.lua;
6866
#more config settings and some server stuff
6967
}

0 commit comments

Comments
 (0)