Problems with Gzip compression on Amazon CloudFrontHow can I get the size of an Amazon S3 bucket?Gzip compression with nginxApache / Nginx / Varnish - GZIP does not work on css, jsAmazon Cloudfront with S3. Access DeniedAmazon Cloudfront with S3 RedirectDoes Amazon CloudFront charge for storage?Amazon S3 + CloudFront + Redirection rules don't workAmazon Cloudfront with S3 bucket - 2 originsNginx reverse-proxy to a cloudfront distribution and preserve gzip compressionEC2 instance has apache2 server installed, but I can't connect to it
Retract an already submitted recommendation letter (written for an undergrad student)
How to pronounce 'c++' in Spanish
Why did C use the -> operator instead of reusing the . operator?
What does a straight horizontal line above a few notes, after a changed tempo mean?
I preordered a game on my Xbox while on the home screen of my friend's account. Which of us owns the game?
Is it acceptable to use working hours to read general interest books?
Is Electric Central Heating worth it if using Solar Panels?
How exactly does Hawking radiation decrease the mass of black holes?
What does "function" actually mean in music?
Critique of timeline aesthetic
Do I need to watch Ant-Man and the Wasp and Captain Marvel before watching Avengers: Endgame?
Is there metaphorical meaning of "aus der Haft entlassen"?
A Paper Record is What I Hamper
Trouble removing package using Yum on CentOS7
Multiple options vs single option UI
What to do with someone that cheated their way through university and a PhD program?
How did Captain America manage to do this?
"Whatever a Russian does, they end up making the Kalashnikov gun"? Are there any similar proverbs in English?
How much of a wave function must reside inside event horizon for it to be consumed by the black hole?
Zonal Statistics is returning null values in ArcGIS
Co-worker works way more than he should
Can a barbarian keep raging if she shoves an enemy on her turn?
How do I produce this Greek letter koppa: Ϟ in pdfLaTeX?
My admission is revoked after accepting the admission offer
Problems with Gzip compression on Amazon CloudFront
How can I get the size of an Amazon S3 bucket?Gzip compression with nginxApache / Nginx / Varnish - GZIP does not work on css, jsAmazon Cloudfront with S3. Access DeniedAmazon Cloudfront with S3 RedirectDoes Amazon CloudFront charge for storage?Amazon S3 + CloudFront + Redirection rules don't workAmazon Cloudfront with S3 bucket - 2 originsNginx reverse-proxy to a cloudfront distribution and preserve gzip compressionEC2 instance has apache2 server installed, but I can't connect to it
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I had a CloudFront distribution configured with S3 as an origin.
I have enabled "Compress Objects Automatically" as per Amazon guide. Waited for the distribution status to display "online" then invalidated all files.
My Response headers are:
Age:5
Connection:keep-alive
Content-Length:232359
Content-Type:application/javascript
Date:Sat, 03 Mar 2018 15:39:10 GMT
Last-Modified:Sat, 03 Mar 2018 15:37:32 GMT
Server:AmazonS3
Vary:Accept-Encoding
Via:1.1 4dbdc57755819d1a0ec1defc2630d677.cloudfront.net (CloudFront)
X-Amz-Cf-Id:6eHPWzOXv2J6kIvzuieoI9chtPBBvEvJFH9fb3yMwHvvcMZ4xsigCA==
X-Cache:Hit from cloudfront
Request Headers:
Accept:*/*
Accept-Encoding:gzip, deflate, br
Accept-Language:en-GB,en;q=0.9,en-US;q=0.8,pl;q=0.7,zh;q=0.6
Cache-Control:no-cache
Connection:keep-alive
Host:d2h5tcpn9r8alm.cloudfront.net
Pragma:no-cache
Referer:https://noru.co.uk/
User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36
It has a "Content-length" and supported "Content-Type", what am I missing? I'm going mad here...
Since then I've created a new s3 bucket and new distribution going through the steps described above, but choosing a different bucket location (in case this is affecting is somehow),
Here are distribution general settings:
Delivery Method Web
Cookie Logging Off
Distribution Status Deployed
Comment -
Price Class Use All Edge Locations (Best Performance)
AWS WAF Web ACL -
State Enabled
Alternate Domain Names (CNAMEs) -
SSL Certificate Default CloudFront Certificate (*.cloudfront.net)
Domain Name d189ud9v76clu1.cloudfront.net
Custom SSL Client Support -
Security Policy TLSv1
Supported HTTP Versions HTTP/2, HTTP/1.1, HTTP/1.0
IPv6 Enabled
Default Root Object -
Last Modified 2018-03-03 15:46 UTC
Log Bucket
And behaviours:
distribution behaviours
I still can't get gzip to work here is the new file:
http://d189ud9v76clu1.cloudfront.net/app.min.js
amazon-web-services amazon-s3 gzip amazon-cloudfront
|
show 2 more comments
I had a CloudFront distribution configured with S3 as an origin.
I have enabled "Compress Objects Automatically" as per Amazon guide. Waited for the distribution status to display "online" then invalidated all files.
My Response headers are:
Age:5
Connection:keep-alive
Content-Length:232359
Content-Type:application/javascript
Date:Sat, 03 Mar 2018 15:39:10 GMT
Last-Modified:Sat, 03 Mar 2018 15:37:32 GMT
Server:AmazonS3
Vary:Accept-Encoding
Via:1.1 4dbdc57755819d1a0ec1defc2630d677.cloudfront.net (CloudFront)
X-Amz-Cf-Id:6eHPWzOXv2J6kIvzuieoI9chtPBBvEvJFH9fb3yMwHvvcMZ4xsigCA==
X-Cache:Hit from cloudfront
Request Headers:
Accept:*/*
Accept-Encoding:gzip, deflate, br
Accept-Language:en-GB,en;q=0.9,en-US;q=0.8,pl;q=0.7,zh;q=0.6
Cache-Control:no-cache
Connection:keep-alive
Host:d2h5tcpn9r8alm.cloudfront.net
Pragma:no-cache
Referer:https://noru.co.uk/
User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36
It has a "Content-length" and supported "Content-Type", what am I missing? I'm going mad here...
Since then I've created a new s3 bucket and new distribution going through the steps described above, but choosing a different bucket location (in case this is affecting is somehow),
Here are distribution general settings:
Delivery Method Web
Cookie Logging Off
Distribution Status Deployed
Comment -
Price Class Use All Edge Locations (Best Performance)
AWS WAF Web ACL -
State Enabled
Alternate Domain Names (CNAMEs) -
SSL Certificate Default CloudFront Certificate (*.cloudfront.net)
Domain Name d189ud9v76clu1.cloudfront.net
Custom SSL Client Support -
Security Policy TLSv1
Supported HTTP Versions HTTP/2, HTTP/1.1, HTTP/1.0
IPv6 Enabled
Default Root Object -
Last Modified 2018-03-03 15:46 UTC
Log Bucket
And behaviours:
distribution behaviours
I still can't get gzip to work here is the new file:
http://d189ud9v76clu1.cloudfront.net/app.min.js
amazon-web-services amazon-s3 gzip amazon-cloudfront
Is the client sending "Accept-Encoding: gzip" in the request to CloudFront? Press F12 in your browser and verify the request headers.
– John Hanley
Mar 3 '18 at 17:43
Yes, I've updated the question with request headers
– Lukigi
Mar 3 '18 at 19:04
I've been messing with this for a while, so I did both, I always invalidate before testing as you can see by the age in the response header.
– Lukigi
Mar 4 '18 at 12:54
What cache? browser cache is cleared while dev tools enabled (I have it ticked). CloudFront cache also no, as before I posted this I had a miss from CloudFront with the same result (I've been messing with this for days now)
– Lukigi
Mar 7 '18 at 18:30
@Lukigi I see that the file is now gzipped. Do you know what made it work? I'm experiencing the same issue right now.
– Jacob Stamm
Oct 24 '18 at 21:13
|
show 2 more comments
I had a CloudFront distribution configured with S3 as an origin.
I have enabled "Compress Objects Automatically" as per Amazon guide. Waited for the distribution status to display "online" then invalidated all files.
My Response headers are:
Age:5
Connection:keep-alive
Content-Length:232359
Content-Type:application/javascript
Date:Sat, 03 Mar 2018 15:39:10 GMT
Last-Modified:Sat, 03 Mar 2018 15:37:32 GMT
Server:AmazonS3
Vary:Accept-Encoding
Via:1.1 4dbdc57755819d1a0ec1defc2630d677.cloudfront.net (CloudFront)
X-Amz-Cf-Id:6eHPWzOXv2J6kIvzuieoI9chtPBBvEvJFH9fb3yMwHvvcMZ4xsigCA==
X-Cache:Hit from cloudfront
Request Headers:
Accept:*/*
Accept-Encoding:gzip, deflate, br
Accept-Language:en-GB,en;q=0.9,en-US;q=0.8,pl;q=0.7,zh;q=0.6
Cache-Control:no-cache
Connection:keep-alive
Host:d2h5tcpn9r8alm.cloudfront.net
Pragma:no-cache
Referer:https://noru.co.uk/
User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36
It has a "Content-length" and supported "Content-Type", what am I missing? I'm going mad here...
Since then I've created a new s3 bucket and new distribution going through the steps described above, but choosing a different bucket location (in case this is affecting is somehow),
Here are distribution general settings:
Delivery Method Web
Cookie Logging Off
Distribution Status Deployed
Comment -
Price Class Use All Edge Locations (Best Performance)
AWS WAF Web ACL -
State Enabled
Alternate Domain Names (CNAMEs) -
SSL Certificate Default CloudFront Certificate (*.cloudfront.net)
Domain Name d189ud9v76clu1.cloudfront.net
Custom SSL Client Support -
Security Policy TLSv1
Supported HTTP Versions HTTP/2, HTTP/1.1, HTTP/1.0
IPv6 Enabled
Default Root Object -
Last Modified 2018-03-03 15:46 UTC
Log Bucket
And behaviours:
distribution behaviours
I still can't get gzip to work here is the new file:
http://d189ud9v76clu1.cloudfront.net/app.min.js
amazon-web-services amazon-s3 gzip amazon-cloudfront
I had a CloudFront distribution configured with S3 as an origin.
I have enabled "Compress Objects Automatically" as per Amazon guide. Waited for the distribution status to display "online" then invalidated all files.
My Response headers are:
Age:5
Connection:keep-alive
Content-Length:232359
Content-Type:application/javascript
Date:Sat, 03 Mar 2018 15:39:10 GMT
Last-Modified:Sat, 03 Mar 2018 15:37:32 GMT
Server:AmazonS3
Vary:Accept-Encoding
Via:1.1 4dbdc57755819d1a0ec1defc2630d677.cloudfront.net (CloudFront)
X-Amz-Cf-Id:6eHPWzOXv2J6kIvzuieoI9chtPBBvEvJFH9fb3yMwHvvcMZ4xsigCA==
X-Cache:Hit from cloudfront
Request Headers:
Accept:*/*
Accept-Encoding:gzip, deflate, br
Accept-Language:en-GB,en;q=0.9,en-US;q=0.8,pl;q=0.7,zh;q=0.6
Cache-Control:no-cache
Connection:keep-alive
Host:d2h5tcpn9r8alm.cloudfront.net
Pragma:no-cache
Referer:https://noru.co.uk/
User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36
It has a "Content-length" and supported "Content-Type", what am I missing? I'm going mad here...
Since then I've created a new s3 bucket and new distribution going through the steps described above, but choosing a different bucket location (in case this is affecting is somehow),
Here are distribution general settings:
Delivery Method Web
Cookie Logging Off
Distribution Status Deployed
Comment -
Price Class Use All Edge Locations (Best Performance)
AWS WAF Web ACL -
State Enabled
Alternate Domain Names (CNAMEs) -
SSL Certificate Default CloudFront Certificate (*.cloudfront.net)
Domain Name d189ud9v76clu1.cloudfront.net
Custom SSL Client Support -
Security Policy TLSv1
Supported HTTP Versions HTTP/2, HTTP/1.1, HTTP/1.0
IPv6 Enabled
Default Root Object -
Last Modified 2018-03-03 15:46 UTC
Log Bucket
And behaviours:
distribution behaviours
I still can't get gzip to work here is the new file:
http://d189ud9v76clu1.cloudfront.net/app.min.js
amazon-web-services amazon-s3 gzip amazon-cloudfront
amazon-web-services amazon-s3 gzip amazon-cloudfront
edited Mar 4 '18 at 12:39
Lukigi
asked Mar 3 '18 at 16:29
LukigiLukigi
164
164
Is the client sending "Accept-Encoding: gzip" in the request to CloudFront? Press F12 in your browser and verify the request headers.
– John Hanley
Mar 3 '18 at 17:43
Yes, I've updated the question with request headers
– Lukigi
Mar 3 '18 at 19:04
I've been messing with this for a while, so I did both, I always invalidate before testing as you can see by the age in the response header.
– Lukigi
Mar 4 '18 at 12:54
What cache? browser cache is cleared while dev tools enabled (I have it ticked). CloudFront cache also no, as before I posted this I had a miss from CloudFront with the same result (I've been messing with this for days now)
– Lukigi
Mar 7 '18 at 18:30
@Lukigi I see that the file is now gzipped. Do you know what made it work? I'm experiencing the same issue right now.
– Jacob Stamm
Oct 24 '18 at 21:13
|
show 2 more comments
Is the client sending "Accept-Encoding: gzip" in the request to CloudFront? Press F12 in your browser and verify the request headers.
– John Hanley
Mar 3 '18 at 17:43
Yes, I've updated the question with request headers
– Lukigi
Mar 3 '18 at 19:04
I've been messing with this for a while, so I did both, I always invalidate before testing as you can see by the age in the response header.
– Lukigi
Mar 4 '18 at 12:54
What cache? browser cache is cleared while dev tools enabled (I have it ticked). CloudFront cache also no, as before I posted this I had a miss from CloudFront with the same result (I've been messing with this for days now)
– Lukigi
Mar 7 '18 at 18:30
@Lukigi I see that the file is now gzipped. Do you know what made it work? I'm experiencing the same issue right now.
– Jacob Stamm
Oct 24 '18 at 21:13
Is the client sending "Accept-Encoding: gzip" in the request to CloudFront? Press F12 in your browser and verify the request headers.
– John Hanley
Mar 3 '18 at 17:43
Is the client sending "Accept-Encoding: gzip" in the request to CloudFront? Press F12 in your browser and verify the request headers.
– John Hanley
Mar 3 '18 at 17:43
Yes, I've updated the question with request headers
– Lukigi
Mar 3 '18 at 19:04
Yes, I've updated the question with request headers
– Lukigi
Mar 3 '18 at 19:04
I've been messing with this for a while, so I did both, I always invalidate before testing as you can see by the age in the response header.
– Lukigi
Mar 4 '18 at 12:54
I've been messing with this for a while, so I did both, I always invalidate before testing as you can see by the age in the response header.
– Lukigi
Mar 4 '18 at 12:54
What cache? browser cache is cleared while dev tools enabled (I have it ticked). CloudFront cache also no, as before I posted this I had a miss from CloudFront with the same result (I've been messing with this for days now)
– Lukigi
Mar 7 '18 at 18:30
What cache? browser cache is cleared while dev tools enabled (I have it ticked). CloudFront cache also no, as before I posted this I had a miss from CloudFront with the same result (I've been messing with this for days now)
– Lukigi
Mar 7 '18 at 18:30
@Lukigi I see that the file is now gzipped. Do you know what made it work? I'm experiencing the same issue right now.
– Jacob Stamm
Oct 24 '18 at 21:13
@Lukigi I see that the file is now gzipped. Do you know what made it work? I'm experiencing the same issue right now.
– Jacob Stamm
Oct 24 '18 at 21:13
|
show 2 more comments
3 Answers
3
active
oldest
votes
Does your request contain the necessary Accept-Encoding: gzip
header?
Your headers look like curl output, which does not send that header by default.
You can test gzip encoding with curl via: curl -H "Accept-Encoding: gzip" https://example.com/asset.js"
This is a standard static web asset, included in html, I've added request headers to the question
– Lukigi
Mar 3 '18 at 19:04
add a comment |
After that I've paid for AWS help desk to solve this issue for me, here is their reply:
I do understand as it can be frustrating, unable to view changes made to your configuration using Developer Tools.
From the documentation that is online I do confirm that it can be a little confusing which I will do a feedback request to make some changes to the documentation, in your case it's more performance changes, if you look at the bottom of Chrome browser, Network option under Developer tools you will see how your pages performance was impacted due to the gzip compression.
To view the configuration through the browser another option the same as you would get in the "curl" command output, by viewing the Response Headers in Developer Tools from any browser.
This can be found if you go the Developer Tools -> Select Network:
* As you saw all the links to your resources , click on the top link domain name "noru.co.uk".
* This will open your Headers which will give the same output as the curl command did example:
Accept-Ranges: bytes
Alt-Svc: quic=":443"; ma=2592000; v="35,37,38,39"
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Content-Encoding: gzip
Content-Length: 3152
Content-Type: text/html; charset=utf-8
Date: Tue, 20 Mar 2018 06:37:04 GMT
Etag: "7073226-1521527798;gz"
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Server: LiteSpeed
Vary: Accept-Encoding
X-Firefox-Spdy: h2
charset: utf-8
x-litespeed-cache: hit,private
x-powered-by: Craft CMS
This will give you most of the information of your configuration to your web pages of that domain.
I hope this helped, if you have any other concerns, please don't hesitate to contact us as I would gladly further assist.
add a comment |
I'll see if I can summarize what happened to me and maybe this will help someone.
Did the initial setup of the S3. Setup CORS but did not have Content-Length added.
Did the initial setup of CloudFront. Did not check Compress.
Everything deploys.
Run a GTMetrix test on the domain and get a F for gzip.
Go back and google what to do to make it work. Realize I need Content-Length header <AllowedHeader>Content-Length</AllowedHeader>
and realize I need to go back to CloudFront and check compress on the Distribution.
But... you also need to invalidate your cache. Essentially all the assets were coming back 304 (Not modified). So you won't get your gzipped assets.
Distribution, Edit, Invalidations, create *
and go.
Hope it helps.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f899820%2fproblems-with-gzip-compression-on-amazon-cloudfront%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Does your request contain the necessary Accept-Encoding: gzip
header?
Your headers look like curl output, which does not send that header by default.
You can test gzip encoding with curl via: curl -H "Accept-Encoding: gzip" https://example.com/asset.js"
This is a standard static web asset, included in html, I've added request headers to the question
– Lukigi
Mar 3 '18 at 19:04
add a comment |
Does your request contain the necessary Accept-Encoding: gzip
header?
Your headers look like curl output, which does not send that header by default.
You can test gzip encoding with curl via: curl -H "Accept-Encoding: gzip" https://example.com/asset.js"
This is a standard static web asset, included in html, I've added request headers to the question
– Lukigi
Mar 3 '18 at 19:04
add a comment |
Does your request contain the necessary Accept-Encoding: gzip
header?
Your headers look like curl output, which does not send that header by default.
You can test gzip encoding with curl via: curl -H "Accept-Encoding: gzip" https://example.com/asset.js"
Does your request contain the necessary Accept-Encoding: gzip
header?
Your headers look like curl output, which does not send that header by default.
You can test gzip encoding with curl via: curl -H "Accept-Encoding: gzip" https://example.com/asset.js"
answered Mar 3 '18 at 17:43
Brennen SmithBrennen Smith
1,315311
1,315311
This is a standard static web asset, included in html, I've added request headers to the question
– Lukigi
Mar 3 '18 at 19:04
add a comment |
This is a standard static web asset, included in html, I've added request headers to the question
– Lukigi
Mar 3 '18 at 19:04
This is a standard static web asset, included in html, I've added request headers to the question
– Lukigi
Mar 3 '18 at 19:04
This is a standard static web asset, included in html, I've added request headers to the question
– Lukigi
Mar 3 '18 at 19:04
add a comment |
After that I've paid for AWS help desk to solve this issue for me, here is their reply:
I do understand as it can be frustrating, unable to view changes made to your configuration using Developer Tools.
From the documentation that is online I do confirm that it can be a little confusing which I will do a feedback request to make some changes to the documentation, in your case it's more performance changes, if you look at the bottom of Chrome browser, Network option under Developer tools you will see how your pages performance was impacted due to the gzip compression.
To view the configuration through the browser another option the same as you would get in the "curl" command output, by viewing the Response Headers in Developer Tools from any browser.
This can be found if you go the Developer Tools -> Select Network:
* As you saw all the links to your resources , click on the top link domain name "noru.co.uk".
* This will open your Headers which will give the same output as the curl command did example:
Accept-Ranges: bytes
Alt-Svc: quic=":443"; ma=2592000; v="35,37,38,39"
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Content-Encoding: gzip
Content-Length: 3152
Content-Type: text/html; charset=utf-8
Date: Tue, 20 Mar 2018 06:37:04 GMT
Etag: "7073226-1521527798;gz"
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Server: LiteSpeed
Vary: Accept-Encoding
X-Firefox-Spdy: h2
charset: utf-8
x-litespeed-cache: hit,private
x-powered-by: Craft CMS
This will give you most of the information of your configuration to your web pages of that domain.
I hope this helped, if you have any other concerns, please don't hesitate to contact us as I would gladly further assist.
add a comment |
After that I've paid for AWS help desk to solve this issue for me, here is their reply:
I do understand as it can be frustrating, unable to view changes made to your configuration using Developer Tools.
From the documentation that is online I do confirm that it can be a little confusing which I will do a feedback request to make some changes to the documentation, in your case it's more performance changes, if you look at the bottom of Chrome browser, Network option under Developer tools you will see how your pages performance was impacted due to the gzip compression.
To view the configuration through the browser another option the same as you would get in the "curl" command output, by viewing the Response Headers in Developer Tools from any browser.
This can be found if you go the Developer Tools -> Select Network:
* As you saw all the links to your resources , click on the top link domain name "noru.co.uk".
* This will open your Headers which will give the same output as the curl command did example:
Accept-Ranges: bytes
Alt-Svc: quic=":443"; ma=2592000; v="35,37,38,39"
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Content-Encoding: gzip
Content-Length: 3152
Content-Type: text/html; charset=utf-8
Date: Tue, 20 Mar 2018 06:37:04 GMT
Etag: "7073226-1521527798;gz"
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Server: LiteSpeed
Vary: Accept-Encoding
X-Firefox-Spdy: h2
charset: utf-8
x-litespeed-cache: hit,private
x-powered-by: Craft CMS
This will give you most of the information of your configuration to your web pages of that domain.
I hope this helped, if you have any other concerns, please don't hesitate to contact us as I would gladly further assist.
add a comment |
After that I've paid for AWS help desk to solve this issue for me, here is their reply:
I do understand as it can be frustrating, unable to view changes made to your configuration using Developer Tools.
From the documentation that is online I do confirm that it can be a little confusing which I will do a feedback request to make some changes to the documentation, in your case it's more performance changes, if you look at the bottom of Chrome browser, Network option under Developer tools you will see how your pages performance was impacted due to the gzip compression.
To view the configuration through the browser another option the same as you would get in the "curl" command output, by viewing the Response Headers in Developer Tools from any browser.
This can be found if you go the Developer Tools -> Select Network:
* As you saw all the links to your resources , click on the top link domain name "noru.co.uk".
* This will open your Headers which will give the same output as the curl command did example:
Accept-Ranges: bytes
Alt-Svc: quic=":443"; ma=2592000; v="35,37,38,39"
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Content-Encoding: gzip
Content-Length: 3152
Content-Type: text/html; charset=utf-8
Date: Tue, 20 Mar 2018 06:37:04 GMT
Etag: "7073226-1521527798;gz"
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Server: LiteSpeed
Vary: Accept-Encoding
X-Firefox-Spdy: h2
charset: utf-8
x-litespeed-cache: hit,private
x-powered-by: Craft CMS
This will give you most of the information of your configuration to your web pages of that domain.
I hope this helped, if you have any other concerns, please don't hesitate to contact us as I would gladly further assist.
After that I've paid for AWS help desk to solve this issue for me, here is their reply:
I do understand as it can be frustrating, unable to view changes made to your configuration using Developer Tools.
From the documentation that is online I do confirm that it can be a little confusing which I will do a feedback request to make some changes to the documentation, in your case it's more performance changes, if you look at the bottom of Chrome browser, Network option under Developer tools you will see how your pages performance was impacted due to the gzip compression.
To view the configuration through the browser another option the same as you would get in the "curl" command output, by viewing the Response Headers in Developer Tools from any browser.
This can be found if you go the Developer Tools -> Select Network:
* As you saw all the links to your resources , click on the top link domain name "noru.co.uk".
* This will open your Headers which will give the same output as the curl command did example:
Accept-Ranges: bytes
Alt-Svc: quic=":443"; ma=2592000; v="35,37,38,39"
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Content-Encoding: gzip
Content-Length: 3152
Content-Type: text/html; charset=utf-8
Date: Tue, 20 Mar 2018 06:37:04 GMT
Etag: "7073226-1521527798;gz"
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Server: LiteSpeed
Vary: Accept-Encoding
X-Firefox-Spdy: h2
charset: utf-8
x-litespeed-cache: hit,private
x-powered-by: Craft CMS
This will give you most of the information of your configuration to your web pages of that domain.
I hope this helped, if you have any other concerns, please don't hesitate to contact us as I would gladly further assist.
answered Oct 25 '18 at 11:10
LukigiLukigi
164
164
add a comment |
add a comment |
I'll see if I can summarize what happened to me and maybe this will help someone.
Did the initial setup of the S3. Setup CORS but did not have Content-Length added.
Did the initial setup of CloudFront. Did not check Compress.
Everything deploys.
Run a GTMetrix test on the domain and get a F for gzip.
Go back and google what to do to make it work. Realize I need Content-Length header <AllowedHeader>Content-Length</AllowedHeader>
and realize I need to go back to CloudFront and check compress on the Distribution.
But... you also need to invalidate your cache. Essentially all the assets were coming back 304 (Not modified). So you won't get your gzipped assets.
Distribution, Edit, Invalidations, create *
and go.
Hope it helps.
add a comment |
I'll see if I can summarize what happened to me and maybe this will help someone.
Did the initial setup of the S3. Setup CORS but did not have Content-Length added.
Did the initial setup of CloudFront. Did not check Compress.
Everything deploys.
Run a GTMetrix test on the domain and get a F for gzip.
Go back and google what to do to make it work. Realize I need Content-Length header <AllowedHeader>Content-Length</AllowedHeader>
and realize I need to go back to CloudFront and check compress on the Distribution.
But... you also need to invalidate your cache. Essentially all the assets were coming back 304 (Not modified). So you won't get your gzipped assets.
Distribution, Edit, Invalidations, create *
and go.
Hope it helps.
add a comment |
I'll see if I can summarize what happened to me and maybe this will help someone.
Did the initial setup of the S3. Setup CORS but did not have Content-Length added.
Did the initial setup of CloudFront. Did not check Compress.
Everything deploys.
Run a GTMetrix test on the domain and get a F for gzip.
Go back and google what to do to make it work. Realize I need Content-Length header <AllowedHeader>Content-Length</AllowedHeader>
and realize I need to go back to CloudFront and check compress on the Distribution.
But... you also need to invalidate your cache. Essentially all the assets were coming back 304 (Not modified). So you won't get your gzipped assets.
Distribution, Edit, Invalidations, create *
and go.
Hope it helps.
I'll see if I can summarize what happened to me and maybe this will help someone.
Did the initial setup of the S3. Setup CORS but did not have Content-Length added.
Did the initial setup of CloudFront. Did not check Compress.
Everything deploys.
Run a GTMetrix test on the domain and get a F for gzip.
Go back and google what to do to make it work. Realize I need Content-Length header <AllowedHeader>Content-Length</AllowedHeader>
and realize I need to go back to CloudFront and check compress on the Distribution.
But... you also need to invalidate your cache. Essentially all the assets were coming back 304 (Not modified). So you won't get your gzipped assets.
Distribution, Edit, Invalidations, create *
and go.
Hope it helps.
answered Apr 18 at 19:52
MarkMark
1011
1011
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f899820%2fproblems-with-gzip-compression-on-amazon-cloudfront%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Is the client sending "Accept-Encoding: gzip" in the request to CloudFront? Press F12 in your browser and verify the request headers.
– John Hanley
Mar 3 '18 at 17:43
Yes, I've updated the question with request headers
– Lukigi
Mar 3 '18 at 19:04
I've been messing with this for a while, so I did both, I always invalidate before testing as you can see by the age in the response header.
– Lukigi
Mar 4 '18 at 12:54
What cache? browser cache is cleared while dev tools enabled (I have it ticked). CloudFront cache also no, as before I posted this I had a miss from CloudFront with the same result (I've been messing with this for days now)
– Lukigi
Mar 7 '18 at 18:30
@Lukigi I see that the file is now gzipped. Do you know what made it work? I'm experiencing the same issue right now.
– Jacob Stamm
Oct 24 '18 at 21:13