Title: Getting Javascript error with compressed (gzip&#039;d) javascript and Cloudfront CDN
Last modified: August 22, 2016

---

# Getting Javascript error with compressed (gzip'd) javascript and Cloudfront CDN

 *  [ZeeMaps](https://wordpress.org/support/users/zeemaps/)
 * (@zeemaps)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/getting-javascript-error-with-compressed-gzipd-javascript-and-cloudfront-cdn/)
 * Hi,
 *  W3 Total Cache is great…so far we’ve improved the site performance by 100%!
 *  As a last step, I wanted to use the CloudFront CDN to host all our static files.
   But when I enable the CloudFront option, I get a Javascript error on the page:
 *  SyntaxError: Invalid character ‘\u0031’
 *  Looks like the Javascript file is not read as a gzipped file by the browser.
   The Request/Response do say that the encoding is gzip.
 *  Am lost, so any pointers would be appreciated.
 *  Thanks.
 * Pankaj
 * [https://wordpress.org/plugins/w3-total-cache/](https://wordpress.org/plugins/w3-total-cache/)

The topic ‘Getting Javascript error with compressed (gzip'd) javascript and Cloudfront
CDN’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

## Tags

 * [amazon cloudfront](https://wordpress.org/support/topic-tag/amazon-cloudfront/)
 * [cdn](https://wordpress.org/support/topic-tag/cdn/)
 * [gzip](https://wordpress.org/support/topic-tag/gzip/)

 * 0 replies
 * 1 participant
 * Last reply from: [ZeeMaps](https://wordpress.org/support/users/zeemaps/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/getting-javascript-error-with-compressed-gzipd-javascript-and-cloudfront-cdn/)
 * Status: not resolved