I am using Gtmetrix
to test my page load time.
I enabled gzip
compression on my site by adding code to .htaccess
.htaccess code:
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
but still Gtmetrix showing the below warning
Compressing http://s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js could save 453.6KiB (71% reduction). This is an external js file. How can I compress this?
Since browser requests for that file do not pass through your web server but rather go directly to s3.amazonaws.com, the short answer is: you can't.
However, you could download the file and put it on your web server and change the corresponding references in your HTML to load it from your site instead of from s3.amazonaws.com.
There is no reason why the file is not available in compressed format from Mailchimp but since they have not done so, you will need to serve it from your webserver to achieve compression.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With