forked from Grailsrocks/grails-zipped-resources
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
31 lines (23 loc) · 806 Bytes
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
This plugin gzips your static resources.
It then sets the Transfer-Encoding header on the resources when rendering them.
Builds on the "Resources" framework plugin
Todos:
* Add "excludes" URIs via Config to prevent certain types and URIs being handled in this way -
e.g. by default should exclude all image and pre-zipped formats but also allow excluding whole URIs and types.
Allow closure to determine it at runtime. e.g.:
zipped.resources.excludes = [
'*.gif',
'*.jpg',
'*.jpeg',
'*.png',
'*.pdf',
'*.zip',
'*.gz',
'*.dmg',
{ uri ->
return !uri.startsWith('user-content')
}
]
* Add a "minimum size" threshold under which it will not bother gzipping.
Default to sane value circa 300bytes. Files smaller than this come out
bigger as zips.