Title: Uncaught SyntaxError: Invalid or unexpected
Last modified: February 28, 2018

---

# Uncaught SyntaxError: Invalid or unexpected

 *  [samarthagarwal](https://wordpress.org/support/users/samarthagarwal/)
 * (@samarthagarwal)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-invalid-or-unexpected/)
 * I have a WordPress website that uses W3 Total Cache plugin to configure Minify,
   Caching and S3 as CDN. I am using Amazon S3 for hosting all the static contents
   of the website from wp-contents and wp-includes folders. However, I get the errors
   like these again and again.
 * [Error Screenshot](https://i.stack.imgur.com/oIGh1.png)
 * I have to Log in to the WordPress admin panel and manually purge all the caches
   to clear these errors but they again come after some time. Sometimes even purging
   does not help. I tried disabling minification and it also did not help. The error
   goes away and comes back for no reason.

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-invalid-or-unexpected/#post-10464953)
 * Hello, first of all, sorry for the late response and the issue you are having.
   
   This is minify Breaking styles, as you may be aware of, sometimes default settings
   will not always work and fine-tuning is required. Try manually excluding scripts
   to find out which one is causing the problems. Please make sure to update W3TC
   to the latest version as a lot of fixes have been applied. Please give us a feedback
   and we can close this topic.
 * Best Regards,
 * Marko

Viewing 1 replies (of 1 total)

The topic ‘Uncaught SyntaxError: Invalid or unexpected’ 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

 * [gzip](https://wordpress.org/support/topic-tag/gzip/)
 * [js](https://wordpress.org/support/topic-tag/js/)
 * [minification](https://wordpress.org/support/topic-tag/minification/)

 * 1 reply
 * 2 participants
 * Last reply from: [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-invalid-or-unexpected/#post-10464953)
 * Status: not resolved