• 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.

    Thank you

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Emre Vona

    (@emrevona)

    I think that the js source is broken. May I see the js url please?

    Thread Starter eldiablock

    (@eldiablock)

    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

    (@emrevona)

    I do not see any MIMI type problem on your site.

    Thread Starter eldiablock

    (@eldiablock)

    Plugin Author Emre Vona

    (@emrevona)

    Can you exclude the “addtoany.min.js” keyword as below and clear all cache with minified sources please?

    Thread Starter eldiablock

    (@eldiablock)

    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

    (@emrevona)

    Please disable the server-side cache system because cache creation date is not current date.

    Thread Starter eldiablock

    (@eldiablock)

    Strange, I have just reset the cache again, I have this :

    <!-- 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

    (@eldiablock)

    Oh, I see, on some page refresh it’s the recent cache, on some others it’s an old one…

    Plugin Author Emre Vona

    (@emrevona)

    Please stop using the server-side cache system because wp fastest cache is not compatible with the server-side cache systems.

    Thread Starter eldiablock

    (@eldiablock)

    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

    (@emrevona)

    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 to reply to this topic.