Title: JS file content type
Last modified: June 9, 2026

---

# JS file content type

 *  [eldiablock](https://wordpress.org/support/users/eldiablock/)
 * (@eldiablock)
 * [6 days, 15 hours ago](https://wordpress.org/support/topic/js-file-content-type/)
 * Hello,
 * I get the following error in the browser console (Chrome, Safari – Firefox seems
   OK) :
 * `Refused to execute script from 'https://[xyz.com]/wp-content/cache/wpfc-minified/
   2dbmf380/hjxhx.js' because its MIME type ('text/js') is not executable, and strict
   MIME type checking is enabled.`
 * I was wondering if the cause would not be in the file wpFastestCache.php with
   the following lines (299 and 315 in my version) :
 * `header('Content-type: text/js');`
 * I think the right content type for Javascript files is `**text/javascript**`.
 * See [here](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/MIME_types/Common_types).
 * Thank you

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

 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [6 days, 7 hours ago](https://wordpress.org/support/topic/js-file-content-type/#post-18933669)
 * I think that the js source is broken. May I see the js url please?
 *  Thread Starter [eldiablock](https://wordpress.org/support/users/eldiablock/)
 * (@eldiablock)
 * [5 days, 18 hours ago](https://wordpress.org/support/topic/js-file-content-type/#post-18934081)
 * Hello, I do have this one this morning :
 * `Refused to execute script from 'https://patrimoine.sncf.com/wp-content/cache/
   wpfc-minified/2dbmf380/i1pcd.js' because its MIME type ('text/js') is not executable,
   and strict MIME type checking is enabled.`
 * The file content seems fine though
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [5 days, 17 hours ago](https://wordpress.org/support/topic/js-file-content-type/#post-18934094)
 * I do not see any MIMI type problem on your site.
 * ![](https://i0.wp.com/i.wpfc.ml/gy/tkqym3.png?ssl=1)
 *  Thread Starter [eldiablock](https://wordpress.org/support/users/eldiablock/)
 * (@eldiablock)
 * [5 days, 17 hours ago](https://wordpress.org/support/topic/js-file-content-type/#post-18934106)
 * Try here [https://patrimoine.sncf.com/jep-en-regions/](https://patrimoine.sncf.com/jep-en-regions/)
   with Chrome
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [5 days, 17 hours ago](https://wordpress.org/support/topic/js-file-content-type/#post-18934113)
 * Can you exclude the “addtoany.min.js” keyword as below and clear all cache with
   minified sources please?
 * ![](https://i0.wp.com/i.wpfc.ml/gy/tkt88k.png?ssl=1)
 *  Thread Starter [eldiablock](https://wordpress.org/support/users/eldiablock/)
 * (@eldiablock)
 * [5 days, 16 hours ago](https://wordpress.org/support/topic/js-file-content-type/#post-18934224)
 * Done, but the issue is still here.
 * Sometimes with multiple refreshes, the issue is gone but it pops again regularly.
 * Chrome says:
 * `Refused to execute script from 'https://patrimoine.sncf.com/wp-content/cache/
   wpfc-minified/2dbmf380/b031.js' because its MIME type ('text/js') is not executable,
   and strict MIME type checking is enabled.`
 * Safari says:
 * `Refused to execute https://patrimoine.sncf.com/wp-content/cache/wpfc-minified/
   2dbmf380/b031.js as script because "X-Content-Type-Options: nosniff" was given
   and its Content-Type is not a script MIME type.`
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [5 days, 15 hours ago](https://wordpress.org/support/topic/js-file-content-type/#post-18934284)
 * Please disable the server-side cache system because cache creation date is not
   current date.
 * ![](https://i0.wp.com/i.wpfc.ml/gy/tlai4r.png?ssl=1)
 *  Thread Starter [eldiablock](https://wordpress.org/support/users/eldiablock/)
 * (@eldiablock)
 * [5 days, 15 hours ago](https://wordpress.org/support/topic/js-file-content-type/#post-18934289)
 * Strange, I have just reset the cache again, I have this :
 *     ```wp-block-code
       <!-- WP Fastest Cache file was created in 0.683 seconds, on 10 June 2026 @ 12h20 -->
       ```
   
 * And before the last refresh it was today as well.
 *  Thread Starter [eldiablock](https://wordpress.org/support/users/eldiablock/)
 * (@eldiablock)
 * [5 days, 15 hours ago](https://wordpress.org/support/topic/js-file-content-type/#post-18934292)
 * Oh, I see, on some page refresh it’s the recent cache, on some others it’s an
   old one…
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [5 days, 15 hours ago](https://wordpress.org/support/topic/js-file-content-type/#post-18934293)
 * Please stop using the server-side cache system because wp fastest cache is not
   compatible with the server-side cache systems.
 *  Thread Starter [eldiablock](https://wordpress.org/support/users/eldiablock/)
 * (@eldiablock)
 * [3 days, 17 hours ago](https://wordpress.org/support/topic/js-file-content-type/#post-18936189)
 * Hello,
 * I have tested disabling wp fastest cache, and the issue was gone.
 * Then I enabled it again. With both wpfc + server side cache, I have modified 
   the plugin code, replacing
 * `header('Content-type: text/js');`
 * by
 * `header('Content-type: text/javascript');`
 * You can see the result on the same page mentionned previously.
 * And the issue is gone.
 * I truly believe you should modify the code as well in the same way. The expected
   content type for JS files is “text/javascript” and not “text/js”.
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [3 days, 17 hours ago](https://wordpress.org/support/topic/js-file-content-type/#post-18936200)
 * you’re absolutely right. I will update the code and release a new version.

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

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjs-file-content-type%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/wp-fastest-cache/assets/icon-256x256.png?rev=2064586)
 * [WP Fastest Cache - WordPress Cache Plugin](https://wordpress.org/plugins/wp-fastest-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-fastest-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-fastest-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-fastest-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-fastest-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-fastest-cache/reviews/)

## Tags

 * [content-type](https://wordpress.org/support/topic-tag/content-type/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 12 replies
 * 2 participants
 * Last reply from: [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * Last activity: [3 days, 17 hours ago](https://wordpress.org/support/topic/js-file-content-type/#post-18936200)
 * Status: not resolved