@@ -14,8 +14,8 @@ the `spew` task uploads any files whose filenames or hashes differ from those in
14
14
the targeted S3 bucket, then decorates them with boot metadata so they may be
15
15
identified by subsequent tasks (see [ boot-front] ( https://github.com/tailrecursion/boot-front ) ).
16
16
17
- the uploaded files may also themselves be adorned with AWS metadata on a per-
18
- file basis to configure HTTP headers in S3 and cloundfront.
17
+ the files themselves may also be individually adorned with AWS metadata to
18
+ configure HTTP headers in S3 and cloundfront.
19
19
20
20
## canned access control lists (ACLs)
21
21
@@ -113,19 +113,14 @@ an `index.html.js` artifact that was compressed upstream by another task like
113
113
:metadata {" index.html.js" {:content-encoding " gzip" }})
114
114
```
115
115
116
- note that it's often important to zip CLJS output as core/goog can weigh in at
117
- multiple MB and compression can drop this file size by 80%+. in fact, it's
118
- possible for compiled CLJS to weigh in at 10MB+ and compress to under 2MB - but
119
- at this point Cloudfront will no longer apply compression due to platform
120
- limitations. pre-gzipping files and setting the correct metadata headers in this
121
- way has several benefits:
116
+ note that it's often good practice to zip the output from the CLJS compiler.
117
+ boot-gzip may drop the file size as much as 80%, which results in a much better
118
+ performance when serving a website from an S3 bucket and conserves space in S3.
119
+ furtherwore, even when deploying the resulting javascript artifact behind
120
+ cloudfront with the built-in compression enabled, if the file size exceeds
121
+ 10MB, it will be ignored.
122
122
123
- - achieve compressed files without cloudfront (e.g. serving site from S3)
124
- - avoid the 1MB min/10MB max limits for on-the-fly compression in cloudfront
125
- - reduce S3 resources needed in upload and storage
126
- - minor performance benefits as cloudfront does not need to apply compression
127
-
128
- note that cloudfront will not apply on-the-fly compression to any file with the
123
+ also note that front will not apply on-the-fly compression to any file with the
129
124
` Content-Encoding ` header set, so be careful to only set it on files that have
130
125
been gzipped during deployment.
131
126
0 commit comments