javascript - GZipping files on S3, compressend and uncompressed -


i trying gzip of larger .files , have taken initial approach here

can walk me through serving gzipped files cloudfront via s3 origin?

  1. gzip file, remove .gz , set correct http headers.

now works, told browsers won't support gzip files, mobile.

so want approach folder contains both i.e.

myfile.js.gz &  myfile.js 

and store them in s3 bucket, , cloudfront should far aware select correct file based on browser can support ?

but if have both in folder, larger myfile.js selected each time.

anyone know missing here ?


Comments