Title: Refused to execute script
Last modified: May 11, 2021

---

# Refused to execute script

 *  Resolved [thomastolkien](https://wordpress.org/support/users/thomastolkien/)
 * (@thomastolkien)
 * [5 years ago](https://wordpress.org/support/topic/refused-to-execute-script-3/)
 * Seeing this error out of the blue today:
 * Refused to execute script from ‘[https://xxxxx.com/wp-content/cache/autoptimize/js/autoptimize_61f2a530e84aeb928162481f3c57015c.js&#8217](https://xxxxx.com/wp-content/cache/autoptimize/js/autoptimize_61f2a530e84aeb928162481f3c57015c.js&#8217);
   because its MIME type (‘text/js’) is not executable, and strict MIME type checking
   is enabled.
 * Please can you advise?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years ago](https://wordpress.org/support/topic/refused-to-execute-script-3/#post-14427379)
 * Autoptimize does not define mime-type for the CSS or JS files Thomas, that typically
   is done on webserver-level. The correct mime-type(s) for JS are `text/javascript`(
   or `application/javascript`) so you will likely have to change webserver configuration?
 * frank
 *  Thread Starter [thomastolkien](https://wordpress.org/support/users/thomastolkien/)
 * (@thomastolkien)
 * [5 years ago](https://wordpress.org/support/topic/refused-to-execute-script-3/#post-14427395)
 * Thanks for looking into this.
 * I’ve checked the server but there haven’t been any changes made or logged.
 * Cloudflare apparently has a 10-minute outage, bizarrely (or not) at exactly the
   same time these errors surfaced.
 * I’ve purged everything at origin and edge and the errors no longer show.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [5 years ago](https://wordpress.org/support/topic/refused-to-execute-script-3/#post-14428234)
 * ah, well, it’s the endpoint that sets the mime-type, in this case cloudflare,
   to it’s indeed possible this is somehow related. good to read all is well now
   🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Refused to execute script’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/refused-to-execute-script-3/#post-14428234)
 * Status: resolved