Reputation: 586
We have migrated our content from Akamai to google cloud storage, Akamai used to gzip content (javascript, CSS etc), now after moving to google storage this gzip compression is not happening which is impacting the performance of our site.
So my questions are :
Content-encoding:gzip
and few other but these are not workingCache-Control:public, max-age=10000, no-transform
but no luckAll content in the bucket is already uploaded and private. Please also note that we have uploaded content as it is (not compressed) on google cloud storage.
Thanks in advance.
Upvotes: 1
Views: 722
Reputation: 12155
You need to compress the content before uploading; setting Content-encoding:gzip
can be used to let the service automatically decompress for clients that don't set Accept-Encoding:gzip
at download time. You get both when you use gsutil cp -Z, for example.
To enable caching you need to set the Cache-Control
header as you did, but you also need to set the access control so the object is publicly readable. Caching is disabled for non-public data.
Upvotes: 3